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-pcf2123.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-pcf2123.c')
-rw-r--r-- | drivers/rtc/rtc-pcf2123.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index b46c4004d8fe..836118795c0b 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c | |||
@@ -346,20 +346,9 @@ static struct spi_driver pcf2123_driver = { | |||
346 | .remove = __devexit_p(pcf2123_remove), | 346 | .remove = __devexit_p(pcf2123_remove), |
347 | }; | 347 | }; |
348 | 348 | ||
349 | static int __init pcf2123_init(void) | 349 | module_spi_driver(pcf2123_driver); |
350 | { | ||
351 | return spi_register_driver(&pcf2123_driver); | ||
352 | } | ||
353 | |||
354 | static void __exit pcf2123_exit(void) | ||
355 | { | ||
356 | spi_unregister_driver(&pcf2123_driver); | ||
357 | } | ||
358 | 350 | ||
359 | MODULE_AUTHOR("Chris Verges <chrisv@cyberswitching.com>"); | 351 | MODULE_AUTHOR("Chris Verges <chrisv@cyberswitching.com>"); |
360 | MODULE_DESCRIPTION("NXP PCF2123 RTC driver"); | 352 | MODULE_DESCRIPTION("NXP PCF2123 RTC driver"); |
361 | MODULE_LICENSE("GPL"); | 353 | MODULE_LICENSE("GPL"); |
362 | MODULE_VERSION(DRV_VERSION); | 354 | MODULE_VERSION(DRV_VERSION); |
363 | |||
364 | module_init(pcf2123_init); | ||
365 | module_exit(pcf2123_exit); | ||