Patchwork [10/24] rtc: rtc-imxdi: use module_platform_driver_probe()

login
register
mail settings
Submitter Jingoo Han
Date March 4, 2013, 8:01 a.m.
Message ID <014301ce18ae$7c80b930$75822b90$%han@samsung.com>
Download mbox | patch
Permalink /patch/224619/
State New
Headers show

Comments

Jingoo Han - March 4, 2013, 8:01 a.m.
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/rtc/rtc-imxdi.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 73cf81c..a5a143e 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -513,18 +513,7 @@  static struct platform_driver dryice_rtc_driver = {
 	.remove = __exit_p(dryice_rtc_remove),
 };
 
-static int __init dryice_rtc_init(void)
-{
-	return platform_driver_probe(&dryice_rtc_driver, dryice_rtc_probe);
-}
-
-static void __exit dryice_rtc_exit(void)
-{
-	platform_driver_unregister(&dryice_rtc_driver);
-}
-
-module_init(dryice_rtc_init);
-module_exit(dryice_rtc_exit);
+module_platform_driver_probe(dryice_rtc_driver, dryice_rtc_probe);
 
 MODULE_AUTHOR("Freescale Semiconductor, Inc.");
 MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");