Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 107402
Collapse All | Expand All

(-)a/drivers/acpi/asus_acpi.c (-8 / +15 lines)
Lines 990-998 static int __init asus_hotk_get_info(voi Link Here
990
	else if (bsts_result)
990
	else if (bsts_result)
991
		printk(KERN_NOTICE "  BSTS called, 0x%02x returned\n", bsts_result);
991
		printk(KERN_NOTICE "  BSTS called, 0x%02x returned\n", bsts_result);
992
992
993
	/* Samsung P30 has a device with a valid _HID whose INIT does not 
993
	/* This is unlikely with implicit return */
994
	 * return anything. Catch this one and any similar here */
994
	if (buffer.pointer == NULL)
995
	if (buffer.pointer == NULL) {
995
		return -EINVAL;
996
997
	model = (union acpi_object *) buffer.pointer;
998
	/*
999
	* Samsung P30 has a device with a valid _HID whose INIT does not
1000
	* return anything. It used to be possible to catch this exception,
1001
	* but the implicit return code will now happily confuse the
1002
	* driver. We assume that every ACPI_TYPE_STRING is a valid model
1003
	* identifier but it's still possible to get completely bogus data.
1004
	*/
1005
	if (model->type == ACPI_TYPE_STRING) {
1006
		printk(KERN_NOTICE "  %s model detected, ", model->string.pointer);
1007
	} else {
996
		if (asus_info && /* Samsung P30 */
1008
		if (asus_info && /* Samsung P30 */
997
		    strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
1009
		    strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
998
			hotk->model = P30;
1010
			hotk->model = P30;
Lines 1007-1017 static int __init asus_hotk_get_info(voi Link Here
1007
		return AE_OK;
1019
		return AE_OK;
1008
	}
1020
	}
1009
	
1021
	
1010
	model = (union acpi_object *) buffer.pointer;
1011
	if (model->type == ACPI_TYPE_STRING) {
1012
		printk(KERN_NOTICE "  %s model detected, ", model->string.pointer);
1013
	}
1014
1015
	hotk->model = END_MODEL;
1022
	hotk->model = END_MODEL;
1016
	if (strncmp(model->string.pointer, "L3D", 3) == 0)
1023
	if (strncmp(model->string.pointer, "L3D", 3) == 0)
1017
		hotk->model = L3D;
1024
		hotk->model = L3D;

Return to bug 107402