diff mbox

[2/2] ARM: S3C24XX: Use module_platform_driver macro in mach-osiris-dvs.c

Message ID 1346837969-11344-2-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Sept. 5, 2012, 9:39 a.m. UTC
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-s3c24xx/mach-osiris-dvs.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

Comments

Kukjin Kim Sept. 6, 2012, 10:09 p.m. UTC | #1
Sachin Kamat wrote:
> 
> module_platform_driver simplifies the code by eliminating
> module_init and module_exit calls.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  arch/arm/mach-s3c24xx/mach-osiris-dvs.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-
> s3c24xx/mach-osiris-dvs.c
> index ad2792d..5876c6b 100644
> --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> @@ -175,18 +175,7 @@ static struct platform_driver osiris_dvs_driver = {
>  	},
>  };
> 
> -static int __init osiris_dvs_init(void)
> -{
> -	return platform_driver_register(&osiris_dvs_driver);
> -}
> -
> -static void __exit osiris_dvs_exit(void)
> -{
> -	platform_driver_unregister(&osiris_dvs_driver);
> -}
> -
> -module_init(osiris_dvs_init);
> -module_exit(osiris_dvs_exit);
> +module_platform_driver(osiris_dvs_driver);
> 
>  MODULE_DESCRIPTION("Simtec OSIRIS DVS support");
>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
> --
> 1.7.4.1

Applied, thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
diff mbox

Patch

diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index ad2792d..5876c6b 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -175,18 +175,7 @@  static struct platform_driver osiris_dvs_driver = {
 	},
 };
 
-static int __init osiris_dvs_init(void)
-{
-	return platform_driver_register(&osiris_dvs_driver);
-}
-
-static void __exit osiris_dvs_exit(void)
-{
-	platform_driver_unregister(&osiris_dvs_driver);
-}
-
-module_init(osiris_dvs_init);
-module_exit(osiris_dvs_exit);
+module_platform_driver(osiris_dvs_driver);
 
 MODULE_DESCRIPTION("Simtec OSIRIS DVS support");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");