From: Guan Xuetao Date: Mon, 26 Dec 2011 09:03:50 +0000 (+0800) Subject: rtc-puv3: using module_platform_driver() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=60e2b00ea200e1527668bfb766ecbdf578ad7de8;p=linux-beck.git 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 Signed-off-by: Guan Xuetao --- 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 = { } }; -static char __initdata banner[] = "PKUnity-v3 RTC, (c) 2009 PKUnity Co.\n"; - -static int __init puv3_rtc_init(void) -{ - printk(banner); - return platform_driver_register(&puv3_rtcdrv); -} - -static void __exit puv3_rtc_exit(void) -{ - platform_driver_unregister(&puv3_rtcdrv); -} - -module_init(puv3_rtc_init); -module_exit(puv3_rtc_exit); +module_platform_driver(puv3_rtcdrv); MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); MODULE_AUTHOR("Hu Dongliang");