]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-max77686.c: use module_platform_driver()
authorJingoo Han <jg1.han@samsung.com>
Sun, 10 Mar 2013 10:54:57 +0000 (21:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2013 03:56:37 +0000 (14:56 +1100)
Use module_platform_driver() 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>
drivers/rtc/rtc-max77686.c

index 6b1337f9baf46b355507a97f83492170ab42521a..a8e31fc833e25fa78ce05fbd4618cac6617a97aa 100644 (file)
@@ -624,17 +624,7 @@ static struct platform_driver max77686_rtc_driver = {
        .id_table       = rtc_id,
 };
 
-static int __init max77686_rtc_init(void)
-{
-       return platform_driver_register(&max77686_rtc_driver);
-}
-module_init(max77686_rtc_init);
-
-static void __exit max77686_rtc_exit(void)
-{
-       platform_driver_unregister(&max77686_rtc_driver);
-}
-module_exit(max77686_rtc_exit);
+module_platform_driver(max77686_rtc_driver);
 
 MODULE_DESCRIPTION("Maxim MAX77686 RTC driver");
 MODULE_AUTHOR("<woong.byun@samsung.com>");