Skip to contentSkip to conversation

+ rtc-rtc-ds1216-use-module_platform_driver_probe.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jul 2, 2013 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

Subject: + rtc-rtc-ds1216-use-module_platform_driver_probe.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 02 Jul 2013 16:06:28 -0700

The patch titled
Subject: drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe()
has been added to the -mm tree. Its filename is
rtc-rtc-ds1216-use-module_platform_driver_probe.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rtc-rtc-ds1216-use-module_platform_driver_probe.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rtc-rtc-ds1216-use-module_platform_driver_probe.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Fabio Porcedda <[email protected]>
Subject: drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe()

Use module_platform_driver_probe() macro which makes the code smaller and simpler.

---

 drivers/rtc/rtc-ds1216.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/rtc/rtc-ds1216.c renamed from drivers/rtc/rtc-ds1216.c~rtc-rtc-ds1216-use-module_platform_driver_probe +1 -9
diff -puN drivers/rtc/rtc-ds1216.c~rtc-rtc-ds1216-use-module_platform_driver_probe drivers/rtc/rtc-ds1216.c
@@ -174,21 +174,10 @@ static struct platform_driver ds1216_rtc
 	},
 };
 
-static int __init ds1216_rtc_init(void)
-{
-	return platform_driver_probe(&ds1216_rtc_platform_driver, ds1216_rtc_probe);
-}
-
-static void __exit ds1216_rtc_exit(void)
-{
-	platform_driver_unregister(&ds1216_rtc_platform_driver);
-}
+module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe);
 
 MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
 MODULE_DESCRIPTION("DS1216 RTC driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
 MODULE_ALIAS("platform:rtc-ds1216");