diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-23 18:02:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:39 -0400 |
commit | 109e941843893cb1b4f7bed24c615ba84ce00ff5 (patch) | |
tree | f71dc3d7386f333d23fd990cee12b91f8296ab3d /drivers/rtc/rtc-m41t93.c | |
parent | ee6c54ca64416c75aa6f5021e139f270192bae49 (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-m41t93.c')
-rw-r--r-- | drivers/rtc/rtc-m41t93.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c index ef71132ff205..10f1c29436ec 100644 --- a/drivers/rtc/rtc-m41t93.c +++ b/drivers/rtc/rtc-m41t93.c | |||
@@ -206,17 +206,7 @@ static struct spi_driver m41t93_driver = { | |||
206 | .remove = __devexit_p(m41t93_remove), | 206 | .remove = __devexit_p(m41t93_remove), |
207 | }; | 207 | }; |
208 | 208 | ||
209 | static __init int m41t93_init(void) | 209 | module_spi_driver(m41t93_driver); |
210 | { | ||
211 | return spi_register_driver(&m41t93_driver); | ||
212 | } | ||
213 | module_init(m41t93_init); | ||
214 | |||
215 | static __exit void m41t93_exit(void) | ||
216 | { | ||
217 | spi_unregister_driver(&m41t93_driver); | ||
218 | } | ||
219 | module_exit(m41t93_exit); | ||
220 | 210 | ||
221 | MODULE_AUTHOR("Nikolaus Voss <n.voss@weinmann.de>"); | 211 | MODULE_AUTHOR("Nikolaus Voss <n.voss@weinmann.de>"); |
222 | MODULE_DESCRIPTION("Driver for ST M41T93 SPI RTC"); | 212 | MODULE_DESCRIPTION("Driver for ST M41T93 SPI RTC"); |