Pull bugzilla-3241 into release branch

Len Brown d0e5f39f 361ea93c

+8 -4
+4 -2
drivers/acpi/ac.c
··· 194 194 device = ac->device; 195 195 switch (event) { 196 196 case ACPI_AC_NOTIFY_STATUS: 197 + case ACPI_NOTIFY_BUS_CHECK: 198 + case ACPI_NOTIFY_DEVICE_CHECK: 197 199 acpi_ac_get_state(ac); 198 200 acpi_bus_generate_event(device, event, (u32) ac->state); 199 201 break; ··· 237 235 goto end; 238 236 239 237 status = acpi_install_notify_handler(device->handle, 240 - ACPI_DEVICE_NOTIFY, acpi_ac_notify, 238 + ACPI_ALL_NOTIFY, acpi_ac_notify, 241 239 ac); 242 240 if (ACPI_FAILURE(status)) { 243 241 result = -ENODEV; ··· 269 267 ac = (struct acpi_ac *)acpi_driver_data(device); 270 268 271 269 status = acpi_remove_notify_handler(device->handle, 272 - ACPI_DEVICE_NOTIFY, acpi_ac_notify); 270 + ACPI_ALL_NOTIFY, acpi_ac_notify); 273 271 274 272 acpi_ac_remove_fs(device); 275 273
+4 -2
drivers/acpi/battery.c
··· 665 665 switch (event) { 666 666 case ACPI_BATTERY_NOTIFY_STATUS: 667 667 case ACPI_BATTERY_NOTIFY_INFO: 668 + case ACPI_NOTIFY_BUS_CHECK: 669 + case ACPI_NOTIFY_DEVICE_CHECK: 668 670 acpi_battery_check(battery); 669 671 acpi_bus_generate_event(device, event, battery->flags.present); 670 672 break; ··· 708 706 goto end; 709 707 710 708 status = acpi_install_notify_handler(device->handle, 711 - ACPI_DEVICE_NOTIFY, 709 + ACPI_ALL_NOTIFY, 712 710 acpi_battery_notify, battery); 713 711 if (ACPI_FAILURE(status)) { 714 712 result = -ENODEV; ··· 740 738 battery = (struct acpi_battery *)acpi_driver_data(device); 741 739 742 740 status = acpi_remove_notify_handler(device->handle, 743 - ACPI_DEVICE_NOTIFY, 741 + ACPI_ALL_NOTIFY, 744 742 acpi_battery_notify); 745 743 746 744 acpi_battery_remove_fs(device);