]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: xo15-ebook: Fix wakeup source and GPE handling
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 May 2026 17:40:31 +0000 (19:40 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 11 May 2026 16:10:06 +0000 (19:10 +0300)
commitb2fc2c6ebbd2d49935c8960755d8170faead2159
treeff26f146c87d351b96f6572fe818b30630284281
parent3b95f36464ec161bcf14c5d1e5f9d5d5e9464582
platform/x86: xo15-ebook: Fix wakeup source and GPE handling

The device_set_wakeup_enable() call in ebook_switch_add() doesn't
actually do anything because power.can_wakeup is not set for ACPI
device objects.  Moreover, had it done anything, it would have
registered a wakeup source object that wouldn't have been used
going forward and that wakeup source would have been leaked after
driver removal because ebook_switch_remove() doesn't clean it up.
Accordingly, remove that call from ebook_switch_add().

Also prevent leaking an enabled ACPI GPE after removing the driver by
adding appropriate cleanup code to ebook_switch_remove().

Fixes: 89ca11771a4b ("OLPC XO-1.5 ebook switch driver")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/1966125.tdWV9SEqCh@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/x86/xo15-ebook.c