Patchwork [1/5] rtc: max77686: use module_platform_driver()

login
register
mail settings
Submitter Jingoo Han
Date Feb. 27, 2013, 5:57 a.m.
Message ID <008f01ce14af$4283cf90$c78b6eb0$%han@samsung.com>
Download mbox | patch
Permalink /patch/223508/
State New
Headers show

Comments

Jingoo Han - Feb. 27, 2013, 5:57 a.m.
This patch uses module_platform_driver() macro which makes
the code smaller and simpler.

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

Patch

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 6b1337f..a8e31fc 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -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>");