]> www.infradead.org Git - users/willy/xarray.git/commit
platform/x86: wmi: Use devres to disable the WMI device
authorArmin Wolf <W_Armin@gmx.de>
Sun, 16 Feb 2025 19:32:48 +0000 (20:32 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 24 Feb 2025 11:19:19 +0000 (13:19 +0200)
commitb6b566908cd75bd99eb0e4b396c89704588261b3
treede08f78aacb682577b2008965c7fb89b7bb82b5b
parent0fcc3162e3fbe4ca9347b2f42313dbf077207bb1
platform/x86: wmi: Use devres to disable the WMI device

Use devm_add_action_or_reset() to disable the WMI device instead of
manually calling wmi_method_enable() to prepare for future changes
inside the WMI data block handlign code.

The reason for this is that we have to make sure that all
devres-managed resources are released first because some might still
want to access the underlying WMI device.

Because devres-managed resources are not released during shutdown
we still have to manually disable the WMI device in this case.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250216193251.866125-6-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/wmi.c