Patchwork [02/24] rtc: rtc-at32ap700x: use module_platform_driver_probe()

login
register
mail settings
Submitter Jingoo Han
Date March 4, 2013, 7:57 a.m.
Message ID <013b01ce18ad$fbb428a0$f31c79e0$%han@samsung.com>
Download mbox | patch
Permalink /patch/224610/
State New
Headers show

Comments

Jingoo Han - March 4, 2013, 7:57 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-at32ap700x.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index 8dd0830..619c887 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -302,17 +302,7 @@  static struct platform_driver at32_rtc_driver = {
 	},
 };
 
-static int __init at32_rtc_init(void)
-{
-	return platform_driver_probe(&at32_rtc_driver, at32_rtc_probe);
-}
-module_init(at32_rtc_init);
-
-static void __exit at32_rtc_exit(void)
-{
-	platform_driver_unregister(&at32_rtc_driver);
-}
-module_exit(at32_rtc_exit);
+module_platform_driver_probe(at32_rtc_driver, at32_rtc_probe);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
 MODULE_DESCRIPTION("Real time clock for AVR32 AT32AP700x");