diff options
author | Devendra Naga <develkernel412222@gmail.com> | 2012-10-04 20:13:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:05:02 -0400 |
commit | 477d30d787b969e4c11fc958077cc7954805e236 (patch) | |
tree | adbd92ca31581da2e5178a15b2ecb823c706b174 /drivers/rtc | |
parent | 2830a6d20139df2198d63235df7957712adb28e5 (diff) |
drivers/rtc/rtc-at91sam9.c: use module_platform_driver() macro
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-at91sam9.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 1dd61f402b04..2dfe7a2fb998 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
@@ -473,18 +473,7 @@ static struct platform_driver at91_rtc_driver = { | |||
473 | }, | 473 | }, |
474 | }; | 474 | }; |
475 | 475 | ||
476 | static int __init at91_rtc_init(void) | 476 | module_platform_driver(at91_rtc_driver); |
477 | { | ||
478 | return platform_driver_register(&at91_rtc_driver); | ||
479 | } | ||
480 | module_init(at91_rtc_init); | ||
481 | |||
482 | static void __exit at91_rtc_exit(void) | ||
483 | { | ||
484 | platform_driver_unregister(&at91_rtc_driver); | ||
485 | } | ||
486 | module_exit(at91_rtc_exit); | ||
487 | |||
488 | 477 | ||
489 | MODULE_AUTHOR("Michel Benoit"); | 478 | MODULE_AUTHOR("Michel Benoit"); |
490 | MODULE_DESCRIPTION("RTC driver for Atmel AT91SAM9x"); | 479 | MODULE_DESCRIPTION("RTC driver for Atmel AT91SAM9x"); |