platform/x86: ideapad-laptop: Fix driver unregistration order

There are two drivers in the ideapad-laptop module: a wmi_driver and a
platform_driver. The former is registered before the latter, but the
unregistration order is the same as the init one instead of the reverse.

Fix the driver unregistration order by reversing it.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260723-ideapad-rev-exit-v2-1-9c31159022de@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Rong Zhang 2026-07-23 02:44:37 +08:00 committed by Ilpo Järvinen
parent f5eb833730
commit 5029bff09e
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -2564,8 +2564,8 @@ module_init(ideapad_laptop_init)
static void __exit ideapad_laptop_exit(void)
{
ideapad_wmi_driver_unregister();
platform_driver_unregister(&ideapad_acpi_driver);
ideapad_wmi_driver_unregister();
}
module_exit(ideapad_laptop_exit)