summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>2013-02-21 16:44:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:22:27 -0800
commit56ae1b8e420015f1428bf9443f1b3321ad789b02 (patch)
tree0c52b964106fbfc5b62d2fbefc377bd85dfceb19 /drivers/rtc
parent0b7e039243425b07a952b81ea5b4d86f46d9cf25 (diff)
downloadop-kernel-dev-56ae1b8e420015f1428bf9443f1b3321ad789b02.zip
op-kernel-dev-56ae1b8e420015f1428bf9443f1b3321ad789b02.tar.gz
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 <srinivas.kandagatla@st.com> 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-ds2404.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c
index 5ea9df7..4539e37 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");
OpenPOWER on IntegriCloud