]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-at91sam9.c: use module_platform_driver() macro
authorDevendra Naga <develkernel412222@gmail.com>
Thu, 13 Sep 2012 01:01:18 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:12 +0000 (17:28 +1000)
This driver does seems to do only platform_driver_register in the init
function and platform_driver_unregister in the exit function,

so replace all this code including the module_init and module_exit with
module_platform_driver macro...

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-at91sam9.c

index 1dd61f402b040441c99078214017f802050c8fa5..2dfe7a2fb99800d063c8010c57ce3ecaf464b800 100644 (file)
@@ -473,18 +473,7 @@ static struct platform_driver at91_rtc_driver = {
        },
 };
 
-static int __init at91_rtc_init(void)
-{
-       return platform_driver_register(&at91_rtc_driver);
-}
-module_init(at91_rtc_init);
-
-static void __exit at91_rtc_exit(void)
-{
-       platform_driver_unregister(&at91_rtc_driver);
-}
-module_exit(at91_rtc_exit);
-
+module_platform_driver(at91_rtc_driver);
 
 MODULE_AUTHOR("Michel Benoit");
 MODULE_DESCRIPTION("RTC driver for Atmel AT91SAM9x");