Commit d1f81a64 authored by Axel Lin's avatar Axel Lin Committed by Chris Ball

mmc: convert drivers/mmc/host/* to use module_platform_driver()

This patch converts the drivers in drivers/mmc/host/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatar"Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Acked-by: default avatarDavid Brown <davidb@codeaurora.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@st.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 6601056a
...@@ -627,17 +627,7 @@ static struct platform_driver sdh_driver = { ...@@ -627,17 +627,7 @@ static struct platform_driver sdh_driver = {
}, },
}; };
static int __init sdh_init(void) module_platform_driver(sdh_driver);
{
return platform_driver_register(&sdh_driver);
}
module_init(sdh_init);
static void __exit sdh_exit(void)
{
platform_driver_unregister(&sdh_driver);
}
module_exit(sdh_exit);
MODULE_DESCRIPTION("Blackfin Secure Digital Host Driver"); MODULE_DESCRIPTION("Blackfin Secure Digital Host Driver");
MODULE_AUTHOR("Cliff Cai, Roy Huang"); MODULE_AUTHOR("Cliff Cai, Roy Huang");
......
...@@ -780,18 +780,7 @@ static struct platform_driver cb710_mmc_driver = { ...@@ -780,18 +780,7 @@ static struct platform_driver cb710_mmc_driver = {
#endif #endif
}; };
static int __init cb710_mmc_init_module(void) module_platform_driver(cb710_mmc_driver);
{
return platform_driver_register(&cb710_mmc_driver);
}
static void __exit cb710_mmc_cleanup_module(void)
{
platform_driver_unregister(&cb710_mmc_driver);
}
module_init(cb710_mmc_init_module);
module_exit(cb710_mmc_cleanup_module);
MODULE_AUTHOR("Michał Mirosław <mirq-linux@rere.qmqm.pl>"); MODULE_AUTHOR("Michał Mirosław <mirq-linux@rere.qmqm.pl>");
MODULE_DESCRIPTION("ENE CB710 memory card reader driver - MMC/SD part"); MODULE_DESCRIPTION("ENE CB710 memory card reader driver - MMC/SD part");
......
...@@ -1012,17 +1012,7 @@ static struct platform_driver jz4740_mmc_driver = { ...@@ -1012,17 +1012,7 @@ static struct platform_driver jz4740_mmc_driver = {
}, },
}; };
static int __init jz4740_mmc_init(void) module_platform_driver(jz4740_mmc_driver);
{
return platform_driver_register(&jz4740_mmc_driver);
}
module_init(jz4740_mmc_init);
static void __exit jz4740_mmc_exit(void)
{
platform_driver_unregister(&jz4740_mmc_driver);
}
module_exit(jz4740_mmc_exit);
MODULE_DESCRIPTION("JZ4740 SD/MMC controller driver"); MODULE_DESCRIPTION("JZ4740 SD/MMC controller driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -1480,18 +1480,7 @@ static struct platform_driver msmsdcc_driver = { ...@@ -1480,18 +1480,7 @@ static struct platform_driver msmsdcc_driver = {
}, },
}; };
static int __init msmsdcc_init(void) module_platform_driver(msmsdcc_driver);
{
return platform_driver_register(&msmsdcc_driver);
}
static void __exit msmsdcc_exit(void)
{
platform_driver_unregister(&msmsdcc_driver);
}
module_init(msmsdcc_init);
module_exit(msmsdcc_exit);
MODULE_DESCRIPTION("Qualcomm MSM 7X00A Multimedia Card Interface driver"); MODULE_DESCRIPTION("Qualcomm MSM 7X00A Multimedia Card Interface driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -1047,18 +1047,7 @@ static struct platform_driver mxcmci_driver = { ...@@ -1047,18 +1047,7 @@ static struct platform_driver mxcmci_driver = {
} }
}; };
static int __init mxcmci_init(void) module_platform_driver(mxcmci_driver);
{
return platform_driver_register(&mxcmci_driver);
}
static void __exit mxcmci_exit(void)
{
platform_driver_unregister(&mxcmci_driver);
}
module_init(mxcmci_init);
module_exit(mxcmci_exit);
MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver"); MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver");
MODULE_AUTHOR("Sascha Hauer, Pengutronix"); MODULE_AUTHOR("Sascha Hauer, Pengutronix");
......
...@@ -855,18 +855,7 @@ static struct platform_driver mxs_mmc_driver = { ...@@ -855,18 +855,7 @@ static struct platform_driver mxs_mmc_driver = {
}, },
}; };
static int __init mxs_mmc_init(void) module_platform_driver(mxs_mmc_driver);
{
return platform_driver_register(&mxs_mmc_driver);
}
static void __exit mxs_mmc_exit(void)
{
platform_driver_unregister(&mxs_mmc_driver);
}
module_init(mxs_mmc_init);
module_exit(mxs_mmc_exit);
MODULE_DESCRIPTION("FREESCALE MXS MMC peripheral"); MODULE_DESCRIPTION("FREESCALE MXS MMC peripheral");
MODULE_AUTHOR("Freescale Semiconductor"); MODULE_AUTHOR("Freescale Semiconductor");
......
...@@ -872,18 +872,7 @@ static struct platform_driver pxamci_driver = { ...@@ -872,18 +872,7 @@ static struct platform_driver pxamci_driver = {
}, },
}; };
static int __init pxamci_init(void) module_platform_driver(pxamci_driver);
{
return platform_driver_register(&pxamci_driver);
}
static void __exit pxamci_exit(void)
{
platform_driver_unregister(&pxamci_driver);
}
module_init(pxamci_init);
module_exit(pxamci_exit);
MODULE_DESCRIPTION("PXA Multimedia Card Interface Driver"); MODULE_DESCRIPTION("PXA Multimedia Card Interface Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -1914,18 +1914,7 @@ static struct platform_driver s3cmci_driver = { ...@@ -1914,18 +1914,7 @@ static struct platform_driver s3cmci_driver = {
.shutdown = s3cmci_shutdown, .shutdown = s3cmci_shutdown,
}; };
static int __init s3cmci_init(void) module_platform_driver(s3cmci_driver);
{
return platform_driver_register(&s3cmci_driver);
}
static void __exit s3cmci_exit(void)
{
platform_driver_unregister(&s3cmci_driver);
}
module_init(s3cmci_init);
module_exit(s3cmci_exit);
MODULE_DESCRIPTION("Samsung S3C MMC/SD Card Interface driver"); MODULE_DESCRIPTION("Samsung S3C MMC/SD Card Interface driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
......
...@@ -115,17 +115,7 @@ static struct platform_driver sdhci_cns3xxx_driver = { ...@@ -115,17 +115,7 @@ static struct platform_driver sdhci_cns3xxx_driver = {
.remove = __devexit_p(sdhci_cns3xxx_remove), .remove = __devexit_p(sdhci_cns3xxx_remove),
}; };
static int __init sdhci_cns3xxx_init(void) module_platform_driver(sdhci_cns3xxx_driver);
{
return platform_driver_register(&sdhci_cns3xxx_driver);
}
module_init(sdhci_cns3xxx_init);
static void __exit sdhci_cns3xxx_exit(void)
{
platform_driver_unregister(&sdhci_cns3xxx_driver);
}
module_exit(sdhci_cns3xxx_exit);
MODULE_DESCRIPTION("SDHCI driver for CNS3xxx"); MODULE_DESCRIPTION("SDHCI driver for CNS3xxx");
MODULE_AUTHOR("Scott Shu, " MODULE_AUTHOR("Scott Shu, "
......
...@@ -88,17 +88,7 @@ static struct platform_driver sdhci_dove_driver = { ...@@ -88,17 +88,7 @@ static struct platform_driver sdhci_dove_driver = {
.remove = __devexit_p(sdhci_dove_remove), .remove = __devexit_p(sdhci_dove_remove),
}; };
static int __init sdhci_dove_init(void) module_platform_driver(sdhci_dove_driver);
{
return platform_driver_register(&sdhci_dove_driver);
}
module_init(sdhci_dove_init);
static void __exit sdhci_dove_exit(void)
{
platform_driver_unregister(&sdhci_dove_driver);
}
module_exit(sdhci_dove_exit);
MODULE_DESCRIPTION("SDHCI driver for Dove"); MODULE_DESCRIPTION("SDHCI driver for Dove");
MODULE_AUTHOR("Saeed Bishara <saeed@marvell.com>, " MODULE_AUTHOR("Saeed Bishara <saeed@marvell.com>, "
......
...@@ -606,17 +606,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { ...@@ -606,17 +606,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = {
.remove = __devexit_p(sdhci_esdhc_imx_remove), .remove = __devexit_p(sdhci_esdhc_imx_remove),
}; };
static int __init sdhci_esdhc_imx_init(void) module_platform_driver(sdhci_esdhc_imx_driver);
{
return platform_driver_register(&sdhci_esdhc_imx_driver);
}
module_init(sdhci_esdhc_imx_init);
static void __exit sdhci_esdhc_imx_exit(void)
{
platform_driver_unregister(&sdhci_esdhc_imx_driver);
}
module_exit(sdhci_esdhc_imx_exit);
MODULE_DESCRIPTION("SDHCI driver for Freescale i.MX eSDHC"); MODULE_DESCRIPTION("SDHCI driver for Freescale i.MX eSDHC");
MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>"); MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
......
...@@ -131,17 +131,7 @@ static struct platform_driver sdhci_esdhc_driver = { ...@@ -131,17 +131,7 @@ static struct platform_driver sdhci_esdhc_driver = {
.remove = __devexit_p(sdhci_esdhc_remove), .remove = __devexit_p(sdhci_esdhc_remove),
}; };
static int __init sdhci_esdhc_init(void) module_platform_driver(sdhci_esdhc_driver);
{
return platform_driver_register(&sdhci_esdhc_driver);
}
module_init(sdhci_esdhc_init);
static void __exit sdhci_esdhc_exit(void)
{
platform_driver_unregister(&sdhci_esdhc_driver);
}
module_exit(sdhci_esdhc_exit);
MODULE_DESCRIPTION("SDHCI OF driver for Freescale MPC eSDHC"); MODULE_DESCRIPTION("SDHCI OF driver for Freescale MPC eSDHC");
MODULE_AUTHOR("Xiaobo Xie <X.Xie@freescale.com>, " MODULE_AUTHOR("Xiaobo Xie <X.Xie@freescale.com>, "
......
...@@ -93,17 +93,7 @@ static struct platform_driver sdhci_hlwd_driver = { ...@@ -93,17 +93,7 @@ static struct platform_driver sdhci_hlwd_driver = {
.remove = __devexit_p(sdhci_hlwd_remove), .remove = __devexit_p(sdhci_hlwd_remove),
}; };
static int __init sdhci_hlwd_init(void) module_platform_driver(sdhci_hlwd_driver);
{
return platform_driver_register(&sdhci_hlwd_driver);
}
module_init(sdhci_hlwd_init);
static void __exit sdhci_hlwd_exit(void)
{
platform_driver_unregister(&sdhci_hlwd_driver);
}
module_exit(sdhci_hlwd_exit);
MODULE_DESCRIPTION("Nintendo Wii SDHCI OF driver"); MODULE_DESCRIPTION("Nintendo Wii SDHCI OF driver");
MODULE_AUTHOR("The GameCube Linux Team, Albert Herranz"); MODULE_AUTHOR("The GameCube Linux Team, Albert Herranz");
......
...@@ -223,18 +223,8 @@ static struct platform_driver sdhci_pxav2_driver = { ...@@ -223,18 +223,8 @@ static struct platform_driver sdhci_pxav2_driver = {
.probe = sdhci_pxav2_probe, .probe = sdhci_pxav2_probe,
.remove = __devexit_p(sdhci_pxav2_remove), .remove = __devexit_p(sdhci_pxav2_remove),
}; };
static int __init sdhci_pxav2_init(void)
{
return platform_driver_register(&sdhci_pxav2_driver);
}
static void __exit sdhci_pxav2_exit(void)
{
platform_driver_unregister(&sdhci_pxav2_driver);
}
module_init(sdhci_pxav2_init); module_platform_driver(sdhci_pxav2_driver);
module_exit(sdhci_pxav2_exit);
MODULE_DESCRIPTION("SDHCI driver for pxav2"); MODULE_DESCRIPTION("SDHCI driver for pxav2");
MODULE_AUTHOR("Marvell International Ltd."); MODULE_AUTHOR("Marvell International Ltd.");
......
...@@ -269,18 +269,8 @@ static struct platform_driver sdhci_pxav3_driver = { ...@@ -269,18 +269,8 @@ static struct platform_driver sdhci_pxav3_driver = {
.probe = sdhci_pxav3_probe, .probe = sdhci_pxav3_probe,
.remove = __devexit_p(sdhci_pxav3_remove), .remove = __devexit_p(sdhci_pxav3_remove),
}; };
static int __init sdhci_pxav3_init(void)
{
return platform_driver_register(&sdhci_pxav3_driver);
}
static void __exit sdhci_pxav3_exit(void)
{
platform_driver_unregister(&sdhci_pxav3_driver);
}
module_init(sdhci_pxav3_init); module_platform_driver(sdhci_pxav3_driver);
module_exit(sdhci_pxav3_exit);
MODULE_DESCRIPTION("SDHCI driver for pxav3"); MODULE_DESCRIPTION("SDHCI driver for pxav3");
MODULE_AUTHOR("Marvell International Ltd."); MODULE_AUTHOR("Marvell International Ltd.");
......
...@@ -657,18 +657,7 @@ static struct platform_driver sdhci_s3c_driver = { ...@@ -657,18 +657,7 @@ static struct platform_driver sdhci_s3c_driver = {
}, },
}; };
static int __init sdhci_s3c_init(void) module_platform_driver(sdhci_s3c_driver);
{
return platform_driver_register(&sdhci_s3c_driver);
}
static void __exit sdhci_s3c_exit(void)
{
platform_driver_unregister(&sdhci_s3c_driver);
}
module_init(sdhci_s3c_init);
module_exit(sdhci_s3c_exit);
MODULE_DESCRIPTION("Samsung SDHCI (HSMMC) glue"); MODULE_DESCRIPTION("Samsung SDHCI (HSMMC) glue");
MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
......
...@@ -320,17 +320,7 @@ static struct platform_driver sdhci_driver = { ...@@ -320,17 +320,7 @@ static struct platform_driver sdhci_driver = {
.remove = __devexit_p(sdhci_remove), .remove = __devexit_p(sdhci_remove),
}; };
static int __init sdhci_init(void) module_platform_driver(sdhci_driver);
{
return platform_driver_register(&sdhci_driver);
}
module_init(sdhci_init);
static void __exit sdhci_exit(void)
{
platform_driver_unregister(&sdhci_driver);
}
module_exit(sdhci_exit);
MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver"); MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver");
MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
......
...@@ -324,17 +324,7 @@ static struct platform_driver sdhci_tegra_driver = { ...@@ -324,17 +324,7 @@ static struct platform_driver sdhci_tegra_driver = {
.remove = __devexit_p(sdhci_tegra_remove), .remove = __devexit_p(sdhci_tegra_remove),
}; };
static int __init sdhci_tegra_init(void) module_platform_driver(sdhci_tegra_driver);
{
return platform_driver_register(&sdhci_tegra_driver);
}
module_init(sdhci_tegra_init);
static void __exit sdhci_tegra_exit(void)
{
platform_driver_unregister(&sdhci_tegra_driver);
}
module_exit(sdhci_tegra_exit);
MODULE_DESCRIPTION("SDHCI driver for Tegra"); MODULE_DESCRIPTION("SDHCI driver for Tegra");
MODULE_AUTHOR(" Google, Inc."); MODULE_AUTHOR(" Google, Inc.");
......
...@@ -1207,19 +1207,7 @@ static struct platform_driver sh_mmcif_driver = { ...@@ -1207,19 +1207,7 @@ static struct platform_driver sh_mmcif_driver = {
}, },
}; };
static int __init sh_mmcif_init(void) module_platform_driver(sh_mmcif_driver);
{
return platform_driver_register(&sh_mmcif_driver);
}
static void __exit sh_mmcif_exit(void)
{
platform_driver_unregister(&sh_mmcif_driver);
}
module_init(sh_mmcif_init);
module_exit(sh_mmcif_exit);
MODULE_DESCRIPTION("SuperH on-chip MMC/eMMC interface driver"); MODULE_DESCRIPTION("SuperH on-chip MMC/eMMC interface driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -282,18 +282,7 @@ static struct platform_driver sh_mobile_sdhi_driver = { ...@@ -282,18 +282,7 @@ static struct platform_driver sh_mobile_sdhi_driver = {
.remove = __devexit_p(sh_mobile_sdhi_remove), .remove = __devexit_p(sh_mobile_sdhi_remove),
}; };
static int __init sh_mobile_sdhi_init(void) module_platform_driver(sh_mobile_sdhi_driver);
{
return platform_driver_register(&sh_mobile_sdhi_driver);
}
static void __exit sh_mobile_sdhi_exit(void)
{
platform_driver_unregister(&sh_mobile_sdhi_driver);
}
module_init(sh_mobile_sdhi_init);
module_exit(sh_mobile_sdhi_exit);
MODULE_DESCRIPTION("SuperH Mobile SDHI driver"); MODULE_DESCRIPTION("SuperH Mobile SDHI driver");
MODULE_AUTHOR("Magnus Damm"); MODULE_AUTHOR("Magnus Damm");
......
...@@ -138,19 +138,7 @@ static struct platform_driver tmio_mmc_driver = { ...@@ -138,19 +138,7 @@ static struct platform_driver tmio_mmc_driver = {
.resume = tmio_mmc_resume, .resume = tmio_mmc_resume,
}; };
module_platform_driver(tmio_mmc_driver);
static int __init tmio_mmc_init(void)
{
return platform_driver_register(&tmio_mmc_driver);
}
static void __exit tmio_mmc_exit(void)
{
platform_driver_unregister(&tmio_mmc_driver);
}
module_init(tmio_mmc_init);
module_exit(tmio_mmc_exit);
MODULE_DESCRIPTION("Toshiba TMIO SD/MMC driver"); MODULE_DESCRIPTION("Toshiba TMIO SD/MMC driver");
MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment