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-max6902.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-max6902.c')
-rw-r--r-- | drivers/rtc/rtc-max6902.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 1f6b3cc58e8a..36c74d22e8b5 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c | |||
@@ -160,17 +160,7 @@ static struct spi_driver max6902_driver = { | |||
160 | .remove = __devexit_p(max6902_remove), | 160 | .remove = __devexit_p(max6902_remove), |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static __init int max6902_init(void) | 163 | module_spi_driver(max6902_driver); |
164 | { | ||
165 | return spi_register_driver(&max6902_driver); | ||
166 | } | ||
167 | module_init(max6902_init); | ||
168 | |||
169 | static __exit void max6902_exit(void) | ||
170 | { | ||
171 | spi_unregister_driver(&max6902_driver); | ||
172 | } | ||
173 | module_exit(max6902_exit); | ||
174 | 164 | ||
175 | MODULE_DESCRIPTION ("max6902 spi RTC driver"); | 165 | MODULE_DESCRIPTION ("max6902 spi RTC driver"); |
176 | MODULE_AUTHOR ("Raphael Assenat"); | 166 | MODULE_AUTHOR ("Raphael Assenat"); |