aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-r9701.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-r9701.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-r9701.c')
-rw-r--r--drivers/rtc/rtc-r9701.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 2853c2a6f10f..7f8e6c247935 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -159,17 +159,7 @@ static struct spi_driver r9701_driver = {
159 .remove = __devexit_p(r9701_remove), 159 .remove = __devexit_p(r9701_remove),
160}; 160};
161 161
162static __init int r9701_init(void) 162module_spi_driver(r9701_driver);
163{
164 return spi_register_driver(&r9701_driver);
165}
166module_init(r9701_init);
167
168static __exit void r9701_exit(void)
169{
170 spi_unregister_driver(&r9701_driver);
171}
172module_exit(r9701_exit);
173 163
174MODULE_DESCRIPTION("r9701 spi RTC driver"); 164MODULE_DESCRIPTION("r9701 spi RTC driver");
175MODULE_AUTHOR("Magnus Damm <damm@opensource.se>"); 165MODULE_AUTHOR("Magnus Damm <damm@opensource.se>");