Re: [PATCH] platform/x86: ideadpad-laptop: Fix driver unregistration order

"Mark Pearson" <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Minor - but you have a typo in the title (ideadpad) :)

On Wed, Jul 22, 2026, at 2:35 PM, Rong Zhang wrote:
> 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.
>
> Fixes: f32e02417614 ("platform/x86: ideapad-laptop: support for more 
> special keys in WMI")
> Signed-off-by: Rong Zhang <[email protected]>
> ---
>  drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c 
> b/drivers/platform/x86/lenovo/ideapad-laptop.c
> index 4fbc904f1fc3..8213524504ee 100644
> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> @@ -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)
> 
>
Reviewed-by: Mark Pearson <[email protected]>
Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.