rtc: rtc-tegra: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 29 Apr 2013 23:18:53 +0000 (16:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:24 +0000 (18:28 -0700)
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>
drivers/rtc/rtc-tegra.c

index 0020bab3f15454a5098cd7ddaf6a40b692368967..9447d65fe2b1393b7a12aa344778127dd6a6306f 100644 (file)
@@ -452,17 +452,7 @@ static struct platform_driver tegra_rtc_driver = {
 #endif
 };
 
-static int __init tegra_rtc_init(void)
-{
-       return platform_driver_probe(&tegra_rtc_driver, tegra_rtc_probe);
-}
-module_init(tegra_rtc_init);
-
-static void __exit tegra_rtc_exit(void)
-{
-       platform_driver_unregister(&tegra_rtc_driver);
-}
-module_exit(tegra_rtc_exit);
+module_platform_driver_probe(tegra_rtc_driver, tegra_rtc_probe);
 
 MODULE_AUTHOR("Jon Mayo <jmayo@nvidia.com>");
 MODULE_DESCRIPTION("driver for Tegra internal RTC");