platform/surface: surfacepro3_button: Drop wakeup source on remove

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: 19351f3407 ("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>
master
Rafael J. Wysocki 2026-03-04 19:54:08 +01:00 committed by Ilpo Järvinen
parent 8a44bd3ffd
commit 1410a228ab
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31
1 changed files with 1 additions and 0 deletions

View 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);
}