mmc: remove unnecessary module_init/exit functions
Subsystems (3)
PATCH v2 1/1 mmc: remove unnecessary module_init/exit functions
Three MMC drivers have unnecessary module_init and module_exit functions that are empty or just print a message. Drivers that do not have module_init or module_exit functions can still be unloaded successfully. Remove them.
---
Changes from v1:
Rebase on latest mmc next branch
Improve commit message
drivers/mmc/host/dw_mmc.c | 13 ------------- drivers/mmc/host/sdhci-pltfm.c | 13 ------------- drivers/mmc/host/sdhci-uhs2.c | 13 +------------ 3 files changed, 1 insertion(+), 38 deletions(-)
drivers/mmc/host/dw_mmc.c +0 -13
@@ -3523,19 +3523,6 @@ int dw_mci_runtime_resume(struct device *dev) }EXPORT_SYMBOL (dw_mci_runtime_resume); -static int __init dw_mci_init (void ) -{ -pr_info ("Synopsys Designware Multimedia Card Interface Driver\n" ); -return 0 ; -} - -static void __exit dw_mci_exit(void) -{ -} - -module_init (dw_mci_init); -module_exit (dw_mci_exit); -MODULE_DESCRIPTION ("DW Multimedia Card Interface driver" );MODULE_AUTHOR ("NXP Semiconductor VietNam" );MODULE_AUTHOR ("Imagination Technologies Ltd" );
drivers/mmc/host/sdhci-pltfm.c +0 -13
@@ -215,19 +215,6 @@ const struct dev_pm_ops sdhci_pltfm_pmops = { };EXPORT_SYMBOL_GPL (sdhci_pltfm_pmops); -static int __init sdhci_pltfm_drv_init (void ) -{ -pr_info ("sdhci-pltfm: SDHCI platform and OF driver helper\n" ); - -return 0 ; -} -module_init (sdhci_pltfm_drv_init); - -static void __exit sdhci_pltfm_drv_exit(void) -{ -} -module_exit (sdhci_pltfm_drv_exit); -MODULE_DESCRIPTION ("SDHCI platform and OF driver helper" );MODULE_AUTHOR ("Intel Corporation" );MODULE_LICENSE ("GPL v2" );
drivers/mmc/host/sdhci-uhs2.c +1 -12
@@ -1126,7 +1126,7 @@ static irqreturn_t sdhci_uhs2_thread_irq(int irq, void *dev_id)/*****************************************************************************\ * * -* Driver init/exit * +* Driver init * * * \*****************************************************************************/
@@ -1138,17 +1138,6 @@ static int sdhci_uhs2_host_ops_init(struct sdhci_host *host)return 0 ; } -static int __init sdhci_uhs2_mod_init (void ) -{ -return 0 ; -} -module_init (sdhci_uhs2_mod_init); - -static void __exit sdhci_uhs2_mod_exit(void) -{ -} -module_exit (sdhci_uhs2_mod_exit); -/*****************************************************************************\ * * Device allocation/registration *
Signature · 1 line
2.43.0
Quoted 6 lines · Ethan Nelson-Moore
Three MMC drivers have unnecessary
module_initandmodule_exitfunctions that are empty or just print a message. Drivers that do not havemodule_initormodule_exitfunctions can still be unloaded successfully. Remove them.
The commit message from v1 was indeed correct, no need to resend. I will pick the commit message from v1 and apply v2 as soon as we have rc1.
Kind regards
Uffe
Quoted 95 lines
---
Changes from v1:
Rebase on latest mmc next branch
Improve commit messageSigned-off-by Ethan Nelson-Moore <[email protected]>drivers/mmc/host/dw_mmc.c | 13 ------------- drivers/mmc/host/sdhci-pltfm.c | 13 ------------- drivers/mmc/host/sdhci-uhs2.c | 13 +------------ 3 files changed, 1 insertion(+), 38 deletions(-)drivers/mmc/host/dw_mmc.c +0
-13@@ -3523,19 +3523,6 @@ int dw_mci_runtime_resume(struct device *dev) }EXPORT_SYMBOL (dw_mci_runtime_resume); -static int __init dw_mci_init (void ) -{ -pr_info ("Synopsys Designware Multimedia Card Interface Driver\n" ); -return 0 ; -} - -static void __exit dw_mci_exit(void) -{ -} - -module_init (dw_mci_init); -module_exit (dw_mci_exit); -MODULE_DESCRIPTION ("DW Multimedia Card Interface driver" );MODULE_AUTHOR ("NXP Semiconductor VietNam" );MODULE_AUTHOR ("Imagination Technologies Ltd" );drivers/mmc/host/sdhci-pltfm.c +0
-13@@ -215,19 +215,6 @@ const struct dev_pm_ops sdhci_pltfm_pmops = { };EXPORT_SYMBOL_GPL (sdhci_pltfm_pmops); -static int __init sdhci_pltfm_drv_init (void ) -{ -pr_info ("sdhci-pltfm: SDHCI platform and OF driver helper\n" ); - -return 0 ; -} -module_init (sdhci_pltfm_drv_init); - -static void __exit sdhci_pltfm_drv_exit(void) -{ -} -module_exit (sdhci_pltfm_drv_exit); -MODULE_DESCRIPTION ("SDHCI platform and OF driver helper" );MODULE_AUTHOR ("Intel Corporation" );MODULE_LICENSE ("GPL v2" );drivers/mmc/host/sdhci-uhs2.c +1
-13@@ -1126,7 +1126,7 @@ static irqreturn_t sdhci_uhs2_thread_irq(int irq, void *dev_id)/*****************************************************************************\ * * -* Driver init/exit * +* Driver init * * * \*****************************************************************************/ @@ -1138,17 +1138,6 @@ static int sdhci_uhs2_host_ops_init(struct sdhci_host *host)return 0 ; } -static int __init sdhci_uhs2_mod_init (void ) -{ -return 0 ; -} -module_init (sdhci_uhs2_mod_init); - -static void __exit sdhci_uhs2_mod_exit(void) -{ -} -module_exit (sdhci_uhs2_mod_exit); -/*****************************************************************************\ * * Device allocation/registration * -- 2.43.0