diff options
| -rw-r--r-- | Documentation/laptops/acer-wmi.txt | 4 | ||||
| -rw-r--r-- | drivers/acpi/scan.c | 3 | ||||
| -rw-r--r-- | drivers/acpi/wmi.c | 10 | ||||
| -rw-r--r-- | drivers/misc/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/misc/acer-wmi.c | 38 | ||||
| -rw-r--r-- | drivers/misc/sony-laptop.c | 2 |
6 files changed, 40 insertions, 18 deletions
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt index b06696329cff..23df051dbf69 100644 --- a/Documentation/laptops/acer-wmi.txt +++ b/Documentation/laptops/acer-wmi.txt | |||
| @@ -48,7 +48,7 @@ DSDT. | |||
| 48 | 48 | ||
| 49 | To send me the DSDT, as root/sudo: | 49 | To send me the DSDT, as root/sudo: |
| 50 | 50 | ||
| 51 | cat /sys/firmware/acpi/DSDT > dsdt | 51 | cat /sys/firmware/acpi/tables/DSDT > dsdt |
| 52 | 52 | ||
| 53 | And send me the resulting 'dsdt' file. | 53 | And send me the resulting 'dsdt' file. |
| 54 | 54 | ||
| @@ -169,7 +169,7 @@ can be added to acer-wmi. | |||
| 169 | 169 | ||
| 170 | The LED is exposed through the LED subsystem, and can be found in: | 170 | The LED is exposed through the LED subsystem, and can be found in: |
| 171 | 171 | ||
| 172 | /sys/devices/platform/acer-wmi/leds/acer-mail:green/ | 172 | /sys/devices/platform/acer-wmi/leds/acer-wmi::mail/ |
| 173 | 173 | ||
| 174 | The mail LED is autodetected, so if you don't have one, the LED device won't | 174 | The mail LED is autodetected, so if you don't have one, the LED device won't |
| 175 | be registered. | 175 | be registered. |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b26e3019e1cc..57570ac47803 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
| @@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) | |||
| 609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); | 609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); |
| 610 | if (ACPI_SUCCESS(status)) { | 610 | if (ACPI_SUCCESS(status)) { |
| 611 | obj = buffer.pointer; | 611 | obj = buffer.pointer; |
| 612 | status = acpi_get_handle(NULL, obj->string.pointer, ejd); | 612 | status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer, |
| 613 | ejd); | ||
| 613 | kfree(buffer.pointer); | 614 | kfree(buffer.pointer); |
| 614 | } | 615 | } |
| 615 | return status; | 616 | return status; |
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index efacc9f8bfe3..c33b1c6e93b1 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
| @@ -293,7 +293,7 @@ struct acpi_buffer *out) | |||
| 293 | { | 293 | { |
| 294 | struct guid_block *block = NULL; | 294 | struct guid_block *block = NULL; |
| 295 | struct wmi_block *wblock = NULL; | 295 | struct wmi_block *wblock = NULL; |
| 296 | acpi_handle handle; | 296 | acpi_handle handle, wc_handle; |
| 297 | acpi_status status, wc_status = AE_ERROR; | 297 | acpi_status status, wc_status = AE_ERROR; |
| 298 | struct acpi_object_list input, wc_input; | 298 | struct acpi_object_list input, wc_input; |
| 299 | union acpi_object wc_params[1], wq_params[1]; | 299 | union acpi_object wc_params[1], wq_params[1]; |
| @@ -338,8 +338,10 @@ struct acpi_buffer *out) | |||
| 338 | * expensive, but have no corresponding WCxx method. So we | 338 | * expensive, but have no corresponding WCxx method. So we |
| 339 | * should not fail if this happens. | 339 | * should not fail if this happens. |
| 340 | */ | 340 | */ |
| 341 | wc_status = acpi_evaluate_object(handle, wc_method, | 341 | wc_status = acpi_get_handle(handle, wc_method, &wc_handle); |
| 342 | &wc_input, NULL); | 342 | if (ACPI_SUCCESS(wc_status)) |
| 343 | wc_status = acpi_evaluate_object(handle, wc_method, | ||
| 344 | &wc_input, NULL); | ||
| 343 | } | 345 | } |
| 344 | 346 | ||
| 345 | strcpy(method, "WQ"); | 347 | strcpy(method, "WQ"); |
| @@ -351,7 +353,7 @@ struct acpi_buffer *out) | |||
| 351 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if | 353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if |
| 352 | * the WQxx method failed - we should disable collection anyway. | 354 | * the WQxx method failed - we should disable collection anyway. |
| 353 | */ | 355 | */ |
| 354 | if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) { | 356 | if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { |
| 355 | wc_params[0].integer.value = 0; | 357 | wc_params[0].integer.value = 0; |
| 356 | status = acpi_evaluate_object(handle, | 358 | status = acpi_evaluate_object(handle, |
| 357 | wc_method, &wc_input, NULL); | 359 | wc_method, &wc_input, NULL); |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 982e27b86d10..962817e49fba 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
| @@ -108,6 +108,7 @@ config ACER_WMI | |||
| 108 | depends on ACPI | 108 | depends on ACPI |
| 109 | depends on LEDS_CLASS | 109 | depends on LEDS_CLASS |
| 110 | depends on BACKLIGHT_CLASS_DEVICE | 110 | depends on BACKLIGHT_CLASS_DEVICE |
| 111 | depends on SERIO_I8042 | ||
| 111 | select ACPI_WMI | 112 | select ACPI_WMI |
| 112 | ---help--- | 113 | ---help--- |
| 113 | This is a driver for newer Acer (and Wistron) laptops. It adds | 114 | This is a driver for newer Acer (and Wistron) laptops. It adds |
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index cf71e312b5cb..dd13a3749927 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
| @@ -219,6 +219,15 @@ static struct dmi_system_id acer_quirks[] = { | |||
| 219 | }, | 219 | }, |
| 220 | { | 220 | { |
| 221 | .callback = dmi_matched, | 221 | .callback = dmi_matched, |
| 222 | .ident = "Acer Aspire 3610", | ||
| 223 | .matches = { | ||
| 224 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
| 225 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3610"), | ||
| 226 | }, | ||
| 227 | .driver_data = &quirk_acer_travelmate_2490, | ||
| 228 | }, | ||
| 229 | { | ||
| 230 | .callback = dmi_matched, | ||
| 222 | .ident = "Acer Aspire 5100", | 231 | .ident = "Acer Aspire 5100", |
| 223 | .matches = { | 232 | .matches = { |
| 224 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 233 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| @@ -228,6 +237,15 @@ static struct dmi_system_id acer_quirks[] = { | |||
| 228 | }, | 237 | }, |
| 229 | { | 238 | { |
| 230 | .callback = dmi_matched, | 239 | .callback = dmi_matched, |
| 240 | .ident = "Acer Aspire 5610", | ||
| 241 | .matches = { | ||
| 242 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
| 243 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), | ||
| 244 | }, | ||
| 245 | .driver_data = &quirk_acer_travelmate_2490, | ||
| 246 | }, | ||
| 247 | { | ||
| 248 | .callback = dmi_matched, | ||
| 231 | .ident = "Acer Aspire 5630", | 249 | .ident = "Acer Aspire 5630", |
| 232 | .matches = { | 250 | .matches = { |
| 233 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 251 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| @@ -761,7 +779,7 @@ enum led_brightness value) | |||
| 761 | } | 779 | } |
| 762 | 780 | ||
| 763 | static struct led_classdev mail_led = { | 781 | static struct led_classdev mail_led = { |
| 764 | .name = "acer-mail:green", | 782 | .name = "acer-wmi::mail", |
| 765 | .brightness_set = mail_led_set, | 783 | .brightness_set = mail_led_set, |
| 766 | }; | 784 | }; |
| 767 | 785 | ||
| @@ -1052,11 +1070,12 @@ static int __init acer_wmi_init(void) | |||
| 1052 | 1070 | ||
| 1053 | if (wmi_has_guid(WMID_GUID2) && interface) { | 1071 | if (wmi_has_guid(WMID_GUID2) && interface) { |
| 1054 | if (ACPI_FAILURE(WMID_set_capabilities())) { | 1072 | if (ACPI_FAILURE(WMID_set_capabilities())) { |
| 1055 | printk(ACER_ERR "Unable to detect available devices\n"); | 1073 | printk(ACER_ERR "Unable to detect available WMID " |
| 1074 | "devices\n"); | ||
| 1056 | return -ENODEV; | 1075 | return -ENODEV; |
| 1057 | } | 1076 | } |
| 1058 | } else if (!wmi_has_guid(WMID_GUID2) && interface) { | 1077 | } else if (!wmi_has_guid(WMID_GUID2) && interface) { |
| 1059 | printk(ACER_ERR "Unable to detect available devices\n"); | 1078 | printk(ACER_ERR "No WMID device detection method found\n"); |
| 1060 | return -ENODEV; | 1079 | return -ENODEV; |
| 1061 | } | 1080 | } |
| 1062 | 1081 | ||
| @@ -1064,21 +1083,20 @@ static int __init acer_wmi_init(void) | |||
| 1064 | interface = &AMW0_interface; | 1083 | interface = &AMW0_interface; |
| 1065 | 1084 | ||
| 1066 | if (ACPI_FAILURE(AMW0_set_capabilities())) { | 1085 | if (ACPI_FAILURE(AMW0_set_capabilities())) { |
| 1067 | printk(ACER_ERR "Unable to detect available devices\n"); | 1086 | printk(ACER_ERR "Unable to detect available AMW0 " |
| 1087 | "devices\n"); | ||
| 1068 | return -ENODEV; | 1088 | return -ENODEV; |
| 1069 | } | 1089 | } |
| 1070 | } | 1090 | } |
| 1071 | 1091 | ||
| 1072 | if (wmi_has_guid(AMW0_GUID1)) { | 1092 | if (wmi_has_guid(AMW0_GUID1)) |
| 1073 | if (ACPI_FAILURE(AMW0_find_mailled())) | 1093 | AMW0_find_mailled(); |
| 1074 | printk(ACER_ERR "Unable to detect mail LED\n"); | ||
| 1075 | } | ||
| 1076 | 1094 | ||
| 1077 | find_quirks(); | 1095 | find_quirks(); |
| 1078 | 1096 | ||
| 1079 | if (!interface) { | 1097 | if (!interface) { |
| 1080 | printk(ACER_ERR "No or unsupported WMI interface, unable to "); | 1098 | printk(ACER_ERR "No or unsupported WMI interface, unable to " |
| 1081 | printk(KERN_CONT "load.\n"); | 1099 | "load\n"); |
| 1082 | return -ENODEV; | 1100 | return -ENODEV; |
| 1083 | } | 1101 | } |
| 1084 | 1102 | ||
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 899e3f75f288..02ff3d19b1cc 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
| @@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event) | |||
| 315 | break; | 315 | break; |
| 316 | 316 | ||
| 317 | default: | 317 | default: |
| 318 | if (event > ARRAY_SIZE(sony_laptop_input_index)) { | 318 | if (event >= ARRAY_SIZE(sony_laptop_input_index)) { |
| 319 | dprintk("sony_laptop_report_input_event, event not known: %d\n", event); | 319 | dprintk("sony_laptop_report_input_event, event not known: %d\n", event); |
| 320 | break; | 320 | break; |
| 321 | } | 321 | } |
