* [PATCH v2] mmc: remove unnecessary module_init/exit functions
@ 2026-02-03 1:23 Ethan Nelson-Moore
2026-02-11 11:28 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-02-03 1:23 UTC (permalink / raw)
To: linux-mmc
Cc: Ethan Nelson-Moore, Adrian Hunter, Jaehoon Chung, Shawn Lin,
Ulf Hansson
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
Acked-by: Adrian Hunter <adrian.hunter@intel.com> (v1)
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
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(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b2ac61f3a8f7..2006ffe7eac7 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -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");
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 7f6ac636f040..d4fb60c1ef69 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -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");
diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
index c459a08d01da..41e49c6cc751 100644
--- a/drivers/mmc/host/sdhci-uhs2.c
+++ b/drivers/mmc/host/sdhci-uhs2.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] mmc: remove unnecessary module_init/exit functions
2026-02-03 1:23 [PATCH v2] mmc: remove unnecessary module_init/exit functions Ethan Nelson-Moore
@ 2026-02-11 11:28 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2026-02-11 11:28 UTC (permalink / raw)
To: Ethan Nelson-Moore; +Cc: linux-mmc, Adrian Hunter, Jaehoon Chung, Shawn Lin
On Tue, 3 Feb 2026 at 02:23, Ethan Nelson-Moore <enelsonmoore@gmail.com> wrote:
>
> 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.
>
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
> ---
> Changes from v1:
> Rebase on latest mmc next branch
> Improve commit message
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com> (v1)
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
>
> 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(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index b2ac61f3a8f7..2006ffe7eac7 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -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");
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 7f6ac636f040..d4fb60c1ef69 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -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");
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index c459a08d01da..41e49c6cc751 100644
> --- a/drivers/mmc/host/sdhci-uhs2.c
> +++ b/drivers/mmc/host/sdhci-uhs2.c
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-11 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 1:23 [PATCH v2] mmc: remove unnecessary module_init/exit functions Ethan Nelson-Moore
2026-02-11 11:28 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox