diff mbox

[1/2] mmc: davinci_mmc: use module_platform_driver_probe()

Message ID 005801ce1954$fc029ce0$f407d6a0$%han@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jingoo Han March 5, 2013, 3:53 a.m. UTC
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mmc/host/davinci_mmc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

Comments

Chris Ball March 22, 2013, 4:30 p.m. UTC | #1
Hi,

On Mon, Mar 04 2013, Jingoo Han wrote:
> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/mmc/host/davinci_mmc.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index 2063677..7635e48 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -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");

Thanks, pushed to mmc-next for 3.10.

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 2063677..7635e48 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -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");