OSDN Git Service

platform/x86: intel-hid: Reset wakeup capable flag on removal
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 Feb 2018 11:10:59 +0000 (12:10 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 1 Mar 2018 11:08:25 +0000 (13:08 +0200)
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: ef884112e55c (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>
drivers/platform/x86/intel-hid.c

index d1a0131..5e3df19 100644 (file)
@@ -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);