* [PATCH v2] platform/x86: ideapad-laptop: Fix driver unregistration order
@ 2026-07-22 18:44 Rong Zhang
2026-07-24 11:54 ` Ilpo Järvinen
0 siblings, 1 reply; 3+ messages in thread
From: Rong Zhang @ 2026-07-22 18:44 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Ike Panhc, Hans de Goede,
Ilpo Järvinen, Philipp Jungkamp
Cc: platform-driver-x86, linux-kernel, Rong Zhang
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")
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v2:
- Fix a typo in title
- Link to v1: https://patch.msgid.link/20260723-ideapad-rev-exit-v1-1-bf0d8ac9b5ed@rong.moe
---
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)
---
base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
change-id: b0d55ec3-ideapad-rev-exit-381b4a9cb5a4
Thanks,
Rong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] platform/x86: ideapad-laptop: Fix driver unregistration order
2026-07-22 18:44 [PATCH v2] platform/x86: ideapad-laptop: Fix driver unregistration order Rong Zhang
@ 2026-07-24 11:54 ` Ilpo Järvinen
2026-07-24 12:20 ` Rong Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2026-07-24 11:54 UTC (permalink / raw)
To: Rong Zhang
Cc: Mark Pearson, Derek J. Clark, Ike Panhc, Hans de Goede,
Philipp Jungkamp, platform-driver-x86, LKML
On Thu, 23 Jul 2026, 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")
> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> Signed-off-by: Rong Zhang <i@rong.moe>
> ---
> Changes in v2:
> - Fix a typo in title
Perhaps too used to writing "dead" so fingers kept typing... I can never
type "roof" succesfully myself, my fingers always do "root" instead. :-)
Anyway, I've applied this but took out the Fixes tag, unless you've some
real bug in mind related to it?
I also added Suggested-by me to take some blame (if necessary).
Thanks for the patch and Mark for review.
--
i.
> - Link to v1: https://patch.msgid.link/20260723-ideapad-rev-exit-v1-1-bf0d8ac9b5ed@rong.moe
> ---
> 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)
>
>
> ---
> base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
> change-id: b0d55ec3-ideapad-rev-exit-381b4a9cb5a4
>
> Thanks,
> Rong
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] platform/x86: ideapad-laptop: Fix driver unregistration order
2026-07-24 11:54 ` Ilpo Järvinen
@ 2026-07-24 12:20 ` Rong Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Rong Zhang @ 2026-07-24 12:20 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Mark Pearson, Derek J. Clark, Ike Panhc, Hans de Goede,
Philipp Jungkamp, platform-driver-x86, LKML
Hi Ilpo,
On Fri, 2026-07-24 at 14:54 +0300, Ilpo Järvinen wrote:
> On Thu, 23 Jul 2026, 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")
> > Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> > Signed-off-by: Rong Zhang <i@rong.moe>
> > ---
> > Changes in v2:
> > - Fix a typo in title
>
> Perhaps too used to writing "dead" so fingers kept typing... I can never
> type "roof" succesfully myself, my fingers always do "root" instead. :-)
An ideadl root does not leak on rainy days ;-P
>
> Anyway, I've applied this but took out the Fixes tag, unless you've some
> real bug in mind related to it?
Makes sense. It's not buggy as the two driver has no dependency on each
other.
>
> I also added Suggested-by me to take some blame (if necessary).
Ahh, forgot that!
>
> Thanks for the patch and Mark for review.
And thanks for reviewing and fixing my patch ;-)
Thanks,
Rong
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-24 12:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22 18:44 [PATCH v2] platform/x86: ideapad-laptop: Fix driver unregistration order Rong Zhang
2026-07-24 11:54 ` Ilpo Järvinen
2026-07-24 12:20 ` Rong Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®