aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m41t94.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-23 18:02:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:39 -0400
commit109e941843893cb1b4f7bed24c615ba84ce00ff5 (patch)
treef71dc3d7386f333d23fd990cee12b91f8296ab3d /drivers/rtc/rtc-m41t94.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-m41t94.c')
-rw-r--r--drivers/rtc/rtc-m41t94.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index 2a4721f61797..6e78193e026b 100644
--- a/drivers/rtc/rtc-m41t94.c
+++ b/drivers/rtc/rtc-m41t94.c
@@ -153,19 +153,7 @@ static struct spi_driver m41t94_driver = {
153 .remove = __devexit_p(m41t94_remove), 153 .remove = __devexit_p(m41t94_remove),
154}; 154};
155 155
156static __init int m41t94_init(void) 156module_spi_driver(m41t94_driver);
157{
158 return spi_register_driver(&m41t94_driver);
159}
160
161module_init(m41t94_init);
162
163static __exit void m41t94_exit(void)
164{
165 spi_unregister_driver(&m41t94_driver);
166}
167
168module_exit(m41t94_exit);
169 157
170MODULE_AUTHOR("Kim B. Heino <Kim.Heino@bluegiga.com>"); 158MODULE_AUTHOR("Kim B. Heino <Kim.Heino@bluegiga.com>");
171MODULE_DESCRIPTION("Driver for ST M41T94 SPI RTC"); 159MODULE_DESCRIPTION("Driver for ST M41T94 SPI RTC");