]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-ds2404.c: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 20 Feb 2013 02:15:43 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:25 +0000 (16:53 +1100)
Remove removes some code duplication by using module_platform_driver().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-ds2404.c

index 5ea9df7c8c31982908a1b67dac341e82b33e6aa5..4539e37c22383c12cdc64807effaeb8b7b585167 100644 (file)
@@ -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");