]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
platform/surface: surfacepro3_button: Drop wakeup source on remove
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Mar 2026 18:54:08 +0000 (19:54 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 9 Mar 2026 14:10:33 +0000 (16:10 +0200)
The wakeup source added by device_init_wakeup() in surface_button_add()
needs to be dropped during driver removal, so update the driver to do
that.

Fixes: 19351f340765 ("platform/x86: surfacepro3: Support for wakeup from suspend-to-idle")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/4368848.1IzOArtZ34@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/surface/surfacepro3_button.c

index 9bd39f09c7db4854cd8f839ff2930c35e5abf2af..a6c9d4d370bec56fd2348eb9fd67346ecdb9ccc1 100644 (file)
@@ -242,6 +242,7 @@ static void surface_button_remove(struct acpi_device *device)
 {
        struct surface_button *button = acpi_driver_data(device);
 
+       device_init_wakeup(&device->dev, false);
        input_unregister_device(button->input);
        kfree(button);
 }