Skip to content

Commit

Permalink
platform/x86: intel-hid: Reset wakeup capable flag on removal
Browse files Browse the repository at this point in the history
The intel-hid device will not be able to wake up the system any more
after removing the notify handler provided by its driver, so make
its sysfs attributes reflect that.

Fixes: ef88411 (platform: x86: intel-hid: Wake up the system from suspend-to-idle)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Rafael J. Wysocki authored and Andy Shevchenko committed Mar 1, 2018
1 parent b758dbd commit 38c08aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/x86/intel-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ static int intel_hid_remove(struct platform_device *device)
{
acpi_handle handle = ACPI_HANDLE(&device->dev);

device_init_wakeup(&device->dev, false);
acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY, notify_handler);
intel_hid_set_enable(&device->dev, false);
intel_button_array_enable(&device->dev, false);
Expand Down

0 comments on commit 38c08aa

Please sign in to comment.