summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-rs5c348.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-23 15:02:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 16:58:39 -0700
commit109e941843893cb1b4f7bed24c615ba84ce00ff5 (patch)
treef71dc3d7386f333d23fd990cee12b91f8296ab3d /drivers/rtc/rtc-rs5c348.c
parentee6c54ca64416c75aa6f5021e139f270192bae49 (diff)
rtc: convert rtc spi drivers to module_spi_driver
Factor out some boilerplate code for spi driver registration into module_spi_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Mark Jackson <mpfj@mimc.co.uk> Cc: Dennis Aberilla <denzzzhome@yahoo.com> Cc: Nikolaus Voss <n.voss@weinmann.de> Cc: "Kim B. Heino" <Kim.Heino@bluegiga.com> Cc: Raphael Assenat <raph@raphnet.net> Cc: Chris Verges <chrisv@cyberswitching.com> Cc: Magnus Damm <damm@opensource.se> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-rs5c348.c')
-rw-r--r--drivers/rtc/rtc-rs5c348.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index ce2ca8523ddd..77074ccd2850 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -235,18 +235,7 @@ static struct spi_driver rs5c348_driver = {
.remove = __devexit_p(rs5c348_remove),
};
-static __init int rs5c348_init(void)
-{
- return spi_register_driver(&rs5c348_driver);
-}
-
-static __exit void rs5c348_exit(void)
-{
- spi_unregister_driver(&rs5c348_driver);
-}
-
-module_init(rs5c348_init);
-module_exit(rs5c348_exit);
+module_spi_driver(rs5c348_driver);
MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
MODULE_DESCRIPTION("Ricoh RS5C348 RTC driver");