diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-23 18:02:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:39 -0400 |
commit | 0abc920116303e81702a38429a1b61a896e02b37 (patch) | |
tree | 69494f8249d1d55fac8a58ff2f67fc346ef52c16 /drivers/rtc/rtc-rv3029c2.c | |
parent | 109e941843893cb1b4f7bed24c615ba84ce00ff5 (diff) |
rtc: convert rtc i2c drivers to module_i2c_driver
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Piotr Ziecik <kosmo@semihalf.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Roman Fietze <roman.fietze@telemotive.de>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Gregory Hermant <gregory.hermant@calao-systems.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Byron Bradley <byron.bbradley@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-rv3029c2.c')
-rw-r--r-- | drivers/rtc/rtc-rv3029c2.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c index ea09ff211dc6..0fbe57b2f6d2 100644 --- a/drivers/rtc/rtc-rv3029c2.c +++ b/drivers/rtc/rtc-rv3029c2.c | |||
@@ -436,18 +436,7 @@ static struct i2c_driver rv3029c2_driver = { | |||
436 | .id_table = rv3029c2_id, | 436 | .id_table = rv3029c2_id, |
437 | }; | 437 | }; |
438 | 438 | ||
439 | static int __init rv3029c2_init(void) | 439 | module_i2c_driver(rv3029c2_driver); |
440 | { | ||
441 | return i2c_add_driver(&rv3029c2_driver); | ||
442 | } | ||
443 | |||
444 | static void __exit rv3029c2_exit(void) | ||
445 | { | ||
446 | i2c_del_driver(&rv3029c2_driver); | ||
447 | } | ||
448 | |||
449 | module_init(rv3029c2_init); | ||
450 | module_exit(rv3029c2_exit); | ||
451 | 440 | ||
452 | MODULE_AUTHOR("Gregory Hermant <gregory.hermant@calao-systems.com>"); | 441 | MODULE_AUTHOR("Gregory Hermant <gregory.hermant@calao-systems.com>"); |
453 | MODULE_DESCRIPTION("Micro Crystal RV3029C2 RTC driver"); | 442 | MODULE_DESCRIPTION("Micro Crystal RV3029C2 RTC driver"); |