Skip to contentSkip to conversation

mmc: davinci_mmc: use module_platform_driver_probe()

PATCH In review Jingoo Han 2 participants 4 messages Mar 5, 2013 – Mar 22, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 mmc: davinci_mmc: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/mmc/host/davinci_mmc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mmc/host/davinci_mmc.c +1 -12
index 2063677..7635e48 100644
@@ -1410,18 +1410,7 @@ static struct platform_driver davinci_mmcsd_driver = {
 	.remove		= __exit_p(davinci_mmcsd_remove),
 };
 
-static int __init davinci_mmcsd_init(void)
-{
-	return platform_driver_probe(&davinci_mmcsd_driver,
-				     davinci_mmcsd_probe);
-}
-module_init(davinci_mmcsd_init);
-
-static void __exit davinci_mmcsd_exit(void)
-{
-	platform_driver_unregister(&davinci_mmcsd_driver);
-}
-module_exit(davinci_mmcsd_exit);
+module_platform_driver_probe(davinci_mmcsd_driver, davinci_mmcsd_probe);
 
 MODULE_AUTHOR("Texas Instruments India");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/2 mmc: mvsdio: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/mmc/host/mvsdio.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mmc/host/mvsdio.c +1 -12
index 145cdaf..2b7d5b7 100644
@@ -881,18 +881,7 @@ static struct platform_driver mvsd_driver = {
 	},
 };
 
-static int __init mvsd_init(void)
-{
-	return platform_driver_probe(&mvsd_driver, mvsd_probe);
-}
-
-static void __exit mvsd_exit(void)
-{
-	platform_driver_unregister(&mvsd_driver);
-}
-
-module_init(mvsd_init);
-module_exit(mvsd_exit);
+module_platform_driver_probe(mvsd_driver, mvsd_probe);
 
 /* maximum card clock frequency (default 50MHz) */
 module_param(maxfreq, int, 0);
Signature · 1 line
1.7.2.5
#3 lore raw
In reply to Jingoo Han

Hi,

Quoted 22 lines · Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/mmc/host/davinci_mmc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mmc/host/davinci_mmc.c +0 -6
index 2063677..7635e48 100644
@@ -1410,18 +1410,7 @@ static struct platform_driver davinci_mmcsd_driver = {
 	.remove		= __exit_p(davinci_mmcsd_remove),
 };
 
-static int __init davinci_mmcsd_init(void)
-{
-	return platform_driver_probe(&davinci_mmcsd_driver,
-				     davinci_mmcsd_probe);
-}
-module_init(davinci_mmcsd_init);

drivers/mmc/host/davinci_mmc.c static struct platform_driver davinci_mmcsd_driver = { · line 1416

Quoted 10 lines
drivers/mmc/host/davinci_mmc.c +1 -6
-
-static void __exit davinci_mmcsd_exit(void)
-{
-	platform_driver_unregister(&davinci_mmcsd_driver);
-}
-module_exit(davinci_mmcsd_exit);
+module_platform_driver_probe(davinci_mmcsd_driver, davinci_mmcsd_probe);
 
 MODULE_AUTHOR("Texas Instruments India");
 MODULE_LICENSE("GPL");

Thanks, pushed to mmc-next for 3.10.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#2 lore raw

Re: [PATCH 2/2] mmc: mvsdio: use module_platform_driver_probe()

In reply to Jingoo Han

Hi,

Quoted 22 lines · Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/mmc/host/mvsdio.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mmc/host/mvsdio.c +0 -6
index 145cdaf..2b7d5b7 100644
@@ -881,18 +881,7 @@ static struct platform_driver mvsd_driver = {
 	},
 };
 
-static int __init mvsd_init(void)
-{
-	return platform_driver_probe(&mvsd_driver, mvsd_probe);
-}
-
-static void __exit mvsd_exit(void)

drivers/mmc/host/mvsdio.c static struct platform_driver mvsd_driver = { · line 887

Quoted 10 lines
drivers/mmc/host/mvsdio.c +1 -6
-{
-	platform_driver_unregister(&mvsd_driver);
-}
-
-module_init(mvsd_init);
-module_exit(mvsd_exit);
+module_platform_driver_probe(mvsd_driver, mvsd_probe);
 
 /* maximum card clock frequency (default 50MHz) */
 module_param(maxfreq, int, 0);

Thanks, pushed to mmc-next for 3.10.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child