mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] rtc: max77686: use module_platform_driver()
@ 2013-02-27  5:57 Jingoo Han
  2013-02-27  5:57 ` [PATCH 2/5] rtc: max77686: add missing module author name Jingoo Han
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jingoo Han @ 2013-02-27  5:57 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jonghwa Lee', 'Jingoo Han'

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(-)

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>");
-- 
1.7.2.5



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-27  5:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27  5:57 [PATCH 1/5] rtc: max77686: use module_platform_driver() Jingoo Han
2013-02-27  5:57 ` [PATCH 2/5] rtc: max77686: add missing module author name Jingoo Han
2013-02-27  5:58 ` [PATCH 3/5] rtc: max77686: use devm_kzalloc() Jingoo Han
2013-02-27  5:58 ` [PATCH 4/5] rtc: max77686: fix indentation of bit definitions Jingoo Han
2013-02-27  5:58 ` [PATCH 5/5] rtc: max77686: use dev_info()/dev_emerg() instead of pr_info()/pr_emerg() Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®