platform: x86: remove unnecessary module_init/exit functions
PATCH 1/1 platform: x86: remove unnecessary module_init/exit functions
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.
--- drivers/platform/x86/asus-wmi.c | 14 -------------- drivers/platform/x86/mxm-wmi.c | 12 ------------ 2 files changed, 26 deletions(-)
drivers/platform/x86/asus-wmi.c +0 -14
@@ -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);
drivers/platform/x86/mxm-wmi.c +0 -12
@@ -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);
Signature · 1 line
2.43.0
Ilpo Järvinen
maintainerQuoted 6 lines · Ethan Nelson-Moore
Two x86 platform drivers have unnecessary
module_initandmodule_exitfunctions that are empty or just print a message. Remove them. Note that if amodule_initfunction exists, amodule_exitfunction 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.