* [PATCH] platform: x86: remove unnecessary module_init/exit functions
@ 2026-01-31 2:01 Ethan Nelson-Moore
2026-03-02 16:42 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-01-31 2:01 UTC (permalink / raw)
To: platform-driver-x86
Cc: Ethan Nelson-Moore, Corentin Chary, Luke D. Jones, Denis Benato,
Hans de Goede, Ilpo Järvinen
Two x86 platform drivers have unnecessary module_init and module_exit
functions that are empty or just print a message. Remove them. Note
that if a module_init function exists, a module_exit function must also
exist; otherwise, the module cannot be unloaded.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/platform/x86/asus-wmi.c | 14 --------------
drivers/platform/x86/mxm-wmi.c | 12 ------------
2 files changed, 26 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 0775fadedd10..9917362461e8 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -5244,17 +5244,3 @@ void asus_wmi_unregister_driver(struct asus_wmi_driver *driver)
used = false;
}
EXPORT_SYMBOL_GPL(asus_wmi_unregister_driver);
-
-static int __init asus_wmi_init(void)
-{
- pr_info("ASUS WMI generic driver loaded\n");
- return 0;
-}
-
-static void __exit asus_wmi_exit(void)
-{
- pr_info("ASUS WMI generic driver unloaded\n");
-}
-
-module_init(asus_wmi_init);
-module_exit(asus_wmi_exit);
diff --git a/drivers/platform/x86/mxm-wmi.c b/drivers/platform/x86/mxm-wmi.c
index 9a457956025a..dbc5e35ec38b 100644
--- a/drivers/platform/x86/mxm-wmi.c
+++ b/drivers/platform/x86/mxm-wmi.c
@@ -80,15 +80,3 @@ bool mxm_wmi_supported(void)
return guid_valid;
}
EXPORT_SYMBOL_GPL(mxm_wmi_supported);
-
-static int __init mxm_wmi_init(void)
-{
- return 0;
-}
-
-static void __exit mxm_wmi_exit(void)
-{
-}
-
-module_init(mxm_wmi_init);
-module_exit(mxm_wmi_exit);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] platform: x86: remove unnecessary module_init/exit functions
2026-01-31 2:01 [PATCH] platform: x86: remove unnecessary module_init/exit functions Ethan Nelson-Moore
@ 2026-03-02 16:42 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-03-02 16:42 UTC (permalink / raw)
To: platform-driver-x86, Ethan Nelson-Moore
Cc: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede
On Fri, 30 Jan 2026 18:01:17 -0800, Ethan Nelson-Moore wrote:
> Two x86 platform drivers have unnecessary module_init and module_exit
> functions that are empty or just print a message. Remove them. Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
>
>
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform: x86: remove unnecessary module_init/exit functions
commit: 85cd4fbf5669cf394c8627d91c7b50b9aca8f4af
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-02 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-31 2:01 [PATCH] platform: x86: remove unnecessary module_init/exit functions Ethan Nelson-Moore
2026-03-02 16:42 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox