summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ab8500.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-11 00:10:48 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-11 01:30:53 +0100
commit0c4eae66591a292fee70051ea363a8d27aa54102 (patch)
tree8dce311ce5149432eee9e55a2a7f4c58aaa239fa /drivers/rtc/rtc-ab8500.c
parentdrivers/rtc/rtc-wm831x.c: convert to devm_kzalloc() (diff)
downloadlinux-0c4eae66591a292fee70051ea363a8d27aa54102.tar.xz
linux-0c4eae66591a292fee70051ea363a8d27aa54102.zip
rtc: convert drivers/rtc/* to use module_platform_driver()
This patch converts the drivers in drivers/rtc/* 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> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Ben Dooks <ben@simtec.co.uk> Cc: John Stultz <john.stultz@linaro.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ab8500.c')
-rw-r--r--drivers/rtc/rtc-ab8500.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index df7bfc304c5e..a0a9810adf0b 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -463,18 +463,8 @@ static struct platform_driver ab8500_rtc_driver = {
.remove = __devexit_p(ab8500_rtc_remove),
};
-static int __init ab8500_rtc_init(void)
-{
- return platform_driver_register(&ab8500_rtc_driver);
-}
-
-static void __exit ab8500_rtc_exit(void)
-{
- platform_driver_unregister(&ab8500_rtc_driver);
-}
+module_platform_driver(ab8500_rtc_driver);
-module_init(ab8500_rtc_init);
-module_exit(ab8500_rtc_exit);
MODULE_AUTHOR("Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>");
MODULE_DESCRIPTION("AB8500 RTC Driver");
MODULE_LICENSE("GPL v2");