diff options
author | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2011-12-26 04:03:50 -0500 |
---|---|---|
committer | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2012-01-09 21:29:42 -0500 |
commit | 60e2b00ea200e1527668bfb766ecbdf578ad7de8 (patch) | |
tree | a278ccad1a1c921c1d4eac69d69cb50e05466191 /drivers | |
parent | 858af58f67d4aba8afb02438e74292b9273cdb10 (diff) |
rtc-puv3: using module_platform_driver()
This patch converts the driver to use the module_platform_driver()
macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-puv3.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 540ead3cb3c7..6490a02b1703 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c | |||
@@ -337,21 +337,7 @@ static struct platform_driver puv3_rtcdrv = { | |||
337 | } | 337 | } |
338 | }; | 338 | }; |
339 | 339 | ||
340 | static char __initdata banner[] = "PKUnity-v3 RTC, (c) 2009 PKUnity Co.\n"; | 340 | module_platform_driver(puv3_rtcdrv); |
341 | |||
342 | static int __init puv3_rtc_init(void) | ||
343 | { | ||
344 | printk(banner); | ||
345 | return platform_driver_register(&puv3_rtcdrv); | ||
346 | } | ||
347 | |||
348 | static void __exit puv3_rtc_exit(void) | ||
349 | { | ||
350 | platform_driver_unregister(&puv3_rtcdrv); | ||
351 | } | ||
352 | |||
353 | module_init(puv3_rtc_init); | ||
354 | module_exit(puv3_rtc_exit); | ||
355 | 341 | ||
356 | MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); | 342 | MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); |
357 | MODULE_AUTHOR("Hu Dongliang"); | 343 | MODULE_AUTHOR("Hu Dongliang"); |