diff options
| author | Axel Lin <[email protected]> | 2012-03-23 22:02:31 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-03-23 23:58:39 +0000 |
| commit | 0abc920116303e81702a38429a1b61a896e02b37 (patch) | |
| tree | 69494f8249d1d55fac8a58ff2f67fc346ef52c16 /drivers/rtc/rtc-ds3232.c | |
| parent | rtc: convert rtc spi drivers to module_spi_driver (diff) | |
| download | kernel-0abc920116303e81702a38429a1b61a896e02b37.tar.gz kernel-0abc920116303e81702a38429a1b61a896e02b37.zip | |
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 <[email protected]>
Cc: Piotr Ziecik <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Scott Wood <[email protected]>
Cc: Srikanth Srinivasan <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Sergey Lapin <[email protected]>
Cc: Roman Fietze <[email protected]>
Cc: Herbert Valerio Riedel <[email protected]>
Cc: Alexander Bigga <[email protected]>
Cc: Dale Farnsworth <[email protected]>
Cc: Gregory Hermant <[email protected]>
Cc: Wolfgang Grandegger <[email protected]>
Cc: Martyn Welch <[email protected]>
Cc: Byron Bradley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/rtc/rtc-ds3232.c')
| -rw-r--r-- | drivers/rtc/rtc-ds3232.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 27b7bf672ac6..e1945095814e 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -473,18 +473,7 @@ static struct i2c_driver ds3232_driver = { .id_table = ds3232_id, }; -static int __init ds3232_init(void) -{ - return i2c_add_driver(&ds3232_driver); -} - -static void __exit ds3232_exit(void) -{ - i2c_del_driver(&ds3232_driver); -} - -module_init(ds3232_init); -module_exit(ds3232_exit); +module_i2c_driver(ds3232_driver); MODULE_AUTHOR("Srikanth Srinivasan <[email protected]>"); MODULE_DESCRIPTION("Maxim/Dallas DS3232 RTC Driver"); |
