forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
19 changed files
with
19 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,17 +187,7 @@ static struct i2c_driver bq32k_driver = { | |
.id_table = bq32k_id, | ||
}; | ||
|
||
static __init int bq32k_init(void) | ||
{ | ||
return i2c_add_driver(&bq32k_driver); | ||
} | ||
module_init(bq32k_init); | ||
|
||
static __exit void bq32k_exit(void) | ||
{ | ||
i2c_del_driver(&bq32k_driver); | ||
} | ||
module_exit(bq32k_exit); | ||
module_i2c_driver(bq32k_driver); | ||
|
||
MODULE_AUTHOR("Semihalf, Piotr Ziecik <[email protected]>"); | ||
MODULE_DESCRIPTION("TI BQ32000 I2C RTC driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -446,18 +446,7 @@ static struct i2c_driver ds1374_driver = { | |
.id_table = ds1374_id, | ||
}; | ||
|
||
static int __init ds1374_init(void) | ||
{ | ||
return i2c_add_driver(&ds1374_driver); | ||
} | ||
|
||
static void __exit ds1374_exit(void) | ||
{ | ||
i2c_del_driver(&ds1374_driver); | ||
} | ||
|
||
module_init(ds1374_init); | ||
module_exit(ds1374_exit); | ||
module_i2c_driver(ds1374_driver); | ||
|
||
MODULE_AUTHOR("Scott Wood <[email protected]>"); | ||
MODULE_DESCRIPTION("Maxim/Dallas DS1374 RTC Driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,20 +202,9 @@ static struct i2c_driver ds1672_driver = { | |
.id_table = ds1672_id, | ||
}; | ||
|
||
static int __init ds1672_init(void) | ||
{ | ||
return i2c_add_driver(&ds1672_driver); | ||
} | ||
|
||
static void __exit ds1672_exit(void) | ||
{ | ||
i2c_del_driver(&ds1672_driver); | ||
} | ||
module_i2c_driver(ds1672_driver); | ||
|
||
MODULE_AUTHOR("Alessandro Zummo <[email protected]>"); | ||
MODULE_DESCRIPTION("Dallas/Maxim DS1672 timekeeper driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(ds1672_init); | ||
module_exit(ds1672_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,19 +144,8 @@ static struct i2c_driver em3027_driver = { | |
.id_table = em3027_id, | ||
}; | ||
|
||
static int __init em3027_init(void) | ||
{ | ||
return i2c_add_driver(&em3027_driver); | ||
} | ||
|
||
static void __exit em3027_exit(void) | ||
{ | ||
i2c_del_driver(&em3027_driver); | ||
} | ||
module_i2c_driver(em3027_driver); | ||
|
||
MODULE_AUTHOR("Mike Rapoport <[email protected]>"); | ||
MODULE_DESCRIPTION("EM Microelectronic EM3027 RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(em3027_init); | ||
module_exit(em3027_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -565,17 +565,7 @@ static struct i2c_driver fm3130_driver = { | |
.id_table = fm3130_id, | ||
}; | ||
|
||
static int __init fm3130_init(void) | ||
{ | ||
return i2c_add_driver(&fm3130_driver); | ||
} | ||
module_init(fm3130_init); | ||
|
||
static void __exit fm3130_exit(void) | ||
{ | ||
i2c_del_driver(&fm3130_driver); | ||
} | ||
module_exit(fm3130_exit); | ||
module_i2c_driver(fm3130_driver); | ||
|
||
MODULE_DESCRIPTION("RTC driver for FM3130"); | ||
MODULE_AUTHOR("Sergey Lapin <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,18 +309,7 @@ static struct i2c_driver isl12022_driver = { | |
.id_table = isl12022_id, | ||
}; | ||
|
||
static int __init isl12022_init(void) | ||
{ | ||
return i2c_add_driver(&isl12022_driver); | ||
} | ||
|
||
static void __exit isl12022_exit(void) | ||
{ | ||
i2c_del_driver(&isl12022_driver); | ||
} | ||
|
||
module_init(isl12022_init); | ||
module_exit(isl12022_exit); | ||
module_i2c_driver(isl12022_driver); | ||
|
||
MODULE_AUTHOR("[email protected]"); | ||
MODULE_DESCRIPTION("ISL 12022 RTC driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -710,22 +710,9 @@ static struct i2c_driver isl1208_driver = { | |
.id_table = isl1208_id, | ||
}; | ||
|
||
static int __init | ||
isl1208_init(void) | ||
{ | ||
return i2c_add_driver(&isl1208_driver); | ||
} | ||
|
||
static void __exit | ||
isl1208_exit(void) | ||
{ | ||
i2c_del_driver(&isl1208_driver); | ||
} | ||
module_i2c_driver(isl1208_driver); | ||
|
||
MODULE_AUTHOR("Herbert Valerio Riedel <[email protected]>"); | ||
MODULE_DESCRIPTION("Intersil ISL1208 RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(isl1208_init); | ||
module_exit(isl1208_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -900,20 +900,9 @@ static struct i2c_driver m41t80_driver = { | |
.id_table = m41t80_id, | ||
}; | ||
|
||
static int __init m41t80_rtc_init(void) | ||
{ | ||
return i2c_add_driver(&m41t80_driver); | ||
} | ||
|
||
static void __exit m41t80_rtc_exit(void) | ||
{ | ||
i2c_del_driver(&m41t80_driver); | ||
} | ||
module_i2c_driver(m41t80_driver); | ||
|
||
MODULE_AUTHOR("Alexander Bigga <[email protected]>"); | ||
MODULE_DESCRIPTION("ST Microelectronics M41T80 series RTC I2C Client Driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(m41t80_rtc_init); | ||
module_exit(m41t80_rtc_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,20 +261,9 @@ static struct i2c_driver max6900_driver = { | |
.id_table = max6900_id, | ||
}; | ||
|
||
static int __init max6900_init(void) | ||
{ | ||
return i2c_add_driver(&max6900_driver); | ||
} | ||
|
||
static void __exit max6900_exit(void) | ||
{ | ||
i2c_del_driver(&max6900_driver); | ||
} | ||
module_i2c_driver(max6900_driver); | ||
|
||
MODULE_DESCRIPTION("Maxim MAX6900 RTC driver"); | ||
MODULE_AUTHOR("Dale Farnsworth <[email protected]>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(max6900_init); | ||
module_exit(max6900_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,20 +252,9 @@ static struct i2c_driver pcf8563_driver = { | |
.id_table = pcf8563_id, | ||
}; | ||
|
||
static int __init pcf8563_init(void) | ||
{ | ||
return i2c_add_driver(&pcf8563_driver); | ||
} | ||
|
||
static void __exit pcf8563_exit(void) | ||
{ | ||
i2c_del_driver(&pcf8563_driver); | ||
} | ||
module_i2c_driver(pcf8563_driver); | ||
|
||
MODULE_AUTHOR("Alessandro Zummo <[email protected]>"); | ||
MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(pcf8563_init); | ||
module_exit(pcf8563_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -689,18 +689,7 @@ static struct i2c_driver rs5c372_driver = { | |
.id_table = rs5c372_id, | ||
}; | ||
|
||
static __init int rs5c372_init(void) | ||
{ | ||
return i2c_add_driver(&rs5c372_driver); | ||
} | ||
|
||
static __exit void rs5c372_exit(void) | ||
{ | ||
i2c_del_driver(&rs5c372_driver); | ||
} | ||
|
||
module_init(rs5c372_init); | ||
module_exit(rs5c372_exit); | ||
module_i2c_driver(rs5c372_driver); | ||
|
||
MODULE_AUTHOR( | ||
"Pavel Mironchik <[email protected]>, " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -436,18 +436,7 @@ static struct i2c_driver rv3029c2_driver = { | |
.id_table = rv3029c2_id, | ||
}; | ||
|
||
static int __init rv3029c2_init(void) | ||
{ | ||
return i2c_add_driver(&rv3029c2_driver); | ||
} | ||
|
||
static void __exit rv3029c2_exit(void) | ||
{ | ||
i2c_del_driver(&rv3029c2_driver); | ||
} | ||
|
||
module_init(rv3029c2_init); | ||
module_exit(rv3029c2_exit); | ||
module_i2c_driver(rv3029c2_driver); | ||
|
||
MODULE_AUTHOR("Gregory Hermant <[email protected]>"); | ||
MODULE_DESCRIPTION("Micro Crystal RV3029C2 RTC driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -644,19 +644,8 @@ static struct i2c_driver rx8025_driver = { | |
.id_table = rx8025_id, | ||
}; | ||
|
||
static int __init rx8025_init(void) | ||
{ | ||
return i2c_add_driver(&rx8025_driver); | ||
} | ||
|
||
static void __exit rx8025_exit(void) | ||
{ | ||
i2c_del_driver(&rx8025_driver); | ||
} | ||
module_i2c_driver(rx8025_driver); | ||
|
||
MODULE_AUTHOR("Wolfgang Grandegger <[email protected]>"); | ||
MODULE_DESCRIPTION("RX-8025 SA/NB RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(rx8025_init); | ||
module_exit(rx8025_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,20 +276,9 @@ static struct i2c_driver rx8581_driver = { | |
.id_table = rx8581_id, | ||
}; | ||
|
||
static int __init rx8581_init(void) | ||
{ | ||
return i2c_add_driver(&rx8581_driver); | ||
} | ||
|
||
static void __exit rx8581_exit(void) | ||
{ | ||
i2c_del_driver(&rx8581_driver); | ||
} | ||
module_i2c_driver(rx8581_driver); | ||
|
||
MODULE_AUTHOR("Martyn Welch <[email protected]>"); | ||
MODULE_DESCRIPTION("Epson RX-8581 RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(rx8581_init); | ||
module_exit(rx8581_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,19 +304,8 @@ static struct i2c_driver s35390a_driver = { | |
.id_table = s35390a_id, | ||
}; | ||
|
||
static int __init s35390a_rtc_init(void) | ||
{ | ||
return i2c_add_driver(&s35390a_driver); | ||
} | ||
|
||
static void __exit s35390a_rtc_exit(void) | ||
{ | ||
i2c_del_driver(&s35390a_driver); | ||
} | ||
module_i2c_driver(s35390a_driver); | ||
|
||
MODULE_AUTHOR("Byron Bradley <[email protected]>"); | ||
MODULE_DESCRIPTION("S35390A RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(s35390a_rtc_init); | ||
module_exit(s35390a_rtc_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -623,22 +623,11 @@ static struct i2c_driver x1205_driver = { | |
.id_table = x1205_id, | ||
}; | ||
|
||
static int __init x1205_init(void) | ||
{ | ||
return i2c_add_driver(&x1205_driver); | ||
} | ||
|
||
static void __exit x1205_exit(void) | ||
{ | ||
i2c_del_driver(&x1205_driver); | ||
} | ||
module_i2c_driver(x1205_driver); | ||
|
||
MODULE_AUTHOR( | ||
"Karen Spearel <kas111 at gmail dot com>, " | ||
"Alessandro Zummo <[email protected]>"); | ||
MODULE_DESCRIPTION("Xicor/Intersil X1205 RTC driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(x1205_init); | ||
module_exit(x1205_exit); |