ACPI: handle AC notify event on broken BIOS

http://bugzilla.kernel.org/show_bug.cgi?id=3241

updated by Vladimir Lebedev

Signed-off-by: Len Brown <len.brown@intel.com>

authored by Christian Lupien and committed by Len Brown 03d78252 37672d4c

+4 -2
+4 -2
drivers/acpi/ac.c
··· 194 device = ac->device; 195 switch (event) { 196 case ACPI_AC_NOTIFY_STATUS: 197 acpi_ac_get_state(ac); 198 acpi_bus_generate_event(device, event, (u32) ac->state); 199 break; ··· 237 goto end; 238 239 status = acpi_install_notify_handler(device->handle, 240 - ACPI_DEVICE_NOTIFY, acpi_ac_notify, 241 ac); 242 if (ACPI_FAILURE(status)) { 243 result = -ENODEV; ··· 269 ac = (struct acpi_ac *)acpi_driver_data(device); 270 271 status = acpi_remove_notify_handler(device->handle, 272 - ACPI_DEVICE_NOTIFY, acpi_ac_notify); 273 274 acpi_ac_remove_fs(device); 275
··· 194 device = ac->device; 195 switch (event) { 196 case ACPI_AC_NOTIFY_STATUS: 197 + case ACPI_NOTIFY_BUS_CHECK: 198 + case ACPI_NOTIFY_DEVICE_CHECK: 199 acpi_ac_get_state(ac); 200 acpi_bus_generate_event(device, event, (u32) ac->state); 201 break; ··· 235 goto end; 236 237 status = acpi_install_notify_handler(device->handle, 238 + ACPI_ALL_NOTIFY, acpi_ac_notify, 239 ac); 240 if (ACPI_FAILURE(status)) { 241 result = -ENODEV; ··· 267 ac = (struct acpi_ac *)acpi_driver_data(device); 268 269 status = acpi_remove_notify_handler(device->handle, 270 + ACPI_ALL_NOTIFY, acpi_ac_notify); 271 272 acpi_ac_remove_fs(device); 273