From: Srinivas Kandagatla Date: Wed, 20 Feb 2013 02:15:43 +0000 (+1100) Subject: drivers/rtc/rtc-ds2404.c: use module_platform_driver macro X-Git-Tag: next-20130220~1^2~263 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d5b701d2e96ddc80d3450d9e07efec536b2bb906;p=karo-tx-linux.git drivers/rtc/rtc-ds2404.c: use module_platform_driver macro Remove removes some code duplication by using module_platform_driver(). Signed-off-by: Srinivas Kandagatla Signed-off-by: Andrew Morton --- diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c index 5ea9df7c8c31..4539e37c2238 100644 --- a/drivers/rtc/rtc-ds2404.c +++ b/drivers/rtc/rtc-ds2404.c @@ -283,19 +283,7 @@ static struct platform_driver rtc_device_driver = { .owner = THIS_MODULE, }, }; - -static __init int ds2404_init(void) -{ - return platform_driver_register(&rtc_device_driver); -} - -static __exit void ds2404_exit(void) -{ - platform_driver_unregister(&rtc_device_driver); -} - -module_init(ds2404_init); -module_exit(ds2404_exit); +module_platform_driver(rtc_device_driver); MODULE_DESCRIPTION("DS2404 RTC"); MODULE_AUTHOR("Sven Schnelle");