]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/platform/olpc: xo15: Drop wakeup source on driver removal
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 May 2026 18:00:27 +0000 (20:00 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 11 May 2026 12:07:58 +0000 (15:07 +0300)
Prevent leaking a wakeup source object after removing the driver by
adding appropriate cleanup code to its remove callback function.

Fixes: a0f30f592d2d ("x86, olpc: Add XO-1.5 SCI driver")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2069931.usQuhbGJ8B@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
arch/x86/platform/olpc/olpc-xo15-sci.c

index 82c51b6ec528891a74e18bef4abe0ae120c58f18..276caf756a9c50a76884cf6bc23ff610db11bf59 100644 (file)
@@ -186,6 +186,7 @@ err_sysfs:
 
 static void xo15_sci_remove(struct acpi_device *device)
 {
+       device_init_wakeup(&device->dev, false);
        acpi_disable_gpe(NULL, xo15_sci_gpe);
        acpi_remove_gpe_handler(NULL, xo15_sci_gpe, xo15_sci_gpe_handler);
        cancel_work_sync(&sci_work);