platform/x86: intel-vbtn: Reset wakeup capable flag on removal
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 Feb 2018 11:09:56 +0000 (12:09 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Feb 2018 12:26:27 +0000 (14:26 +0200)
The intel-vbtn 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: 91f9e850d465 (platform: x86: intel-vbtn: 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-vbtn.c

index 8173307d6bb1220dc8a664ead8123403147fb301..c13780b8dabbe089c24a2b5c323f1510f589153e 100644 (file)
@@ -166,6 +166,7 @@ static int intel_vbtn_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);
 
        /*