public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver
@ 2017-08-19 13:06 Axel Lin
  2017-08-21 10:36 ` Jan Glauber
  2017-08-22 11:15 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2017-08-19 13:06 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Jan Glauber, David Daney, Steven J. Hill, linux-mmc, Axel Lin

Get rid of boilerplate code by using module_platform_driver macro.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mmc/host/cavium-octeon.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 951d2cd..22aded1 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -342,18 +342,7 @@ static struct platform_driver octeon_mmc_driver = {
 	},
 };
 
-static int __init octeon_mmc_init(void)
-{
-	return platform_driver_register(&octeon_mmc_driver);
-}
-
-static void __exit octeon_mmc_cleanup(void)
-{
-	platform_driver_unregister(&octeon_mmc_driver);
-}
-
-module_init(octeon_mmc_init);
-module_exit(octeon_mmc_cleanup);
+module_platform_driver(octeon_mmc_driver);
 
 MODULE_AUTHOR("Cavium Inc. <support@cavium.com>");
 MODULE_DESCRIPTION("Low-level driver for Cavium OCTEON MMC/SSD card");
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver
  2017-08-19 13:06 [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver Axel Lin
@ 2017-08-21 10:36 ` Jan Glauber
  2017-08-22 11:15 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Glauber @ 2017-08-21 10:36 UTC (permalink / raw)
  To: Axel Lin; +Cc: Ulf Hansson, David Daney, Steven J. Hill, linux-mmc

On Sat, Aug 19, 2017 at 09:06:11PM +0800, Axel Lin wrote:
> Get rid of boilerplate code by using module_platform_driver macro.

Looks good. If you want to add:
Acked-by: Jan Glauber <jglauber@cavium.com>

thanks, Jan

> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/mmc/host/cavium-octeon.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
> index 951d2cd..22aded1 100644
> --- a/drivers/mmc/host/cavium-octeon.c
> +++ b/drivers/mmc/host/cavium-octeon.c
> @@ -342,18 +342,7 @@ static struct platform_driver octeon_mmc_driver = {
>  	},
>  };
>  
> -static int __init octeon_mmc_init(void)
> -{
> -	return platform_driver_register(&octeon_mmc_driver);
> -}
> -
> -static void __exit octeon_mmc_cleanup(void)
> -{
> -	platform_driver_unregister(&octeon_mmc_driver);
> -}
> -
> -module_init(octeon_mmc_init);
> -module_exit(octeon_mmc_cleanup);
> +module_platform_driver(octeon_mmc_driver);
>  
>  MODULE_AUTHOR("Cavium Inc. <support@cavium.com>");
>  MODULE_DESCRIPTION("Low-level driver for Cavium OCTEON MMC/SSD card");
> -- 
> 2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver
  2017-08-19 13:06 [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver Axel Lin
  2017-08-21 10:36 ` Jan Glauber
@ 2017-08-22 11:15 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-08-22 11:15 UTC (permalink / raw)
  To: Axel Lin
  Cc: Jan Glauber, David Daney, Steven J. Hill,
	linux-mmc@vger.kernel.org

On 19 August 2017 at 15:06, Axel Lin <axel.lin@ingics.com> wrote:
> Get rid of boilerplate code by using module_platform_driver macro.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/cavium-octeon.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
> index 951d2cd..22aded1 100644
> --- a/drivers/mmc/host/cavium-octeon.c
> +++ b/drivers/mmc/host/cavium-octeon.c
> @@ -342,18 +342,7 @@ static struct platform_driver octeon_mmc_driver = {
>         },
>  };
>
> -static int __init octeon_mmc_init(void)
> -{
> -       return platform_driver_register(&octeon_mmc_driver);
> -}
> -
> -static void __exit octeon_mmc_cleanup(void)
> -{
> -       platform_driver_unregister(&octeon_mmc_driver);
> -}
> -
> -module_init(octeon_mmc_init);
> -module_exit(octeon_mmc_cleanup);
> +module_platform_driver(octeon_mmc_driver);
>
>  MODULE_AUTHOR("Cavium Inc. <support@cavium.com>");
>  MODULE_DESCRIPTION("Low-level driver for Cavium OCTEON MMC/SSD card");
> --
> 2.9.3
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-22 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 13:06 [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver Axel Lin
2017-08-21 10:36 ` Jan Glauber
2017-08-22 11:15 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox