summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-29 16:18:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:28:23 -0700
commita53f9a4eeea929ce96113ce8af6c7488a3525b6d (patch)
tree6e9d4e1319f7423eb61e6a7b146e402a191924af
parent52c6ecbc80d7619dc52cdbddf7eaf0d923deb54f (diff)
rtc: rtc-generic: use module_platform_driver_probe()
Use module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-generic.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c
index 98322004ad2e..0bf4530e18b0 100644
--- a/drivers/rtc/rtc-generic.c
+++ b/drivers/rtc/rtc-generic.c
@@ -65,18 +65,7 @@ static struct platform_driver generic_rtc_driver = {
.remove = __exit_p(generic_rtc_remove),
};
-static int __init generic_rtc_init(void)
-{
- return platform_driver_probe(&generic_rtc_driver, generic_rtc_probe);
-}
-
-static void __exit generic_rtc_fini(void)
-{
- platform_driver_unregister(&generic_rtc_driver);
-}
-
-module_init(generic_rtc_init);
-module_exit(generic_rtc_fini);
+module_platform_driver_probe(generic_rtc_driver, generic_rtc_probe);
MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
MODULE_LICENSE("GPL");