forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MISC: convert drivers/misc/* to use module_i2c_driver()
This patch converts the drivers in drivers/misc/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Anantha Narayanan <[email protected]> Cc: Hemanth V <[email protected]> Cc: Christoph Mair <[email protected]> Cc: Grant Likely <[email protected]> Cc: Ben Gardner <[email protected]> Cc: Minkyu Kang <[email protected]> Cc: Kalhan Trisal <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Rodolfo Giometti <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
16 changed files
with
17 additions
and
194 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 |
---|---|---|
|
@@ -113,17 +113,7 @@ static struct i2c_driver ad_dpot_i2c_driver = { | |
.id_table = ad_dpot_id, | ||
}; | ||
|
||
static int __init ad_dpot_i2c_init(void) | ||
{ | ||
return i2c_add_driver(&ad_dpot_i2c_driver); | ||
} | ||
module_init(ad_dpot_i2c_init); | ||
|
||
static void __exit ad_dpot_i2c_exit(void) | ||
{ | ||
i2c_del_driver(&ad_dpot_i2c_driver); | ||
} | ||
module_exit(ad_dpot_i2c_exit); | ||
module_i2c_driver(ad_dpot_i2c_driver); | ||
|
||
MODULE_AUTHOR("Michael Hennerich <[email protected]>"); | ||
MODULE_DESCRIPTION("digital potentiometer I2C bus 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 |
---|---|---|
|
@@ -332,17 +332,7 @@ static struct i2c_driver apds9802als_driver = { | |
.id_table = apds9802als_id, | ||
}; | ||
|
||
static int __init sensor_apds9802als_init(void) | ||
{ | ||
return i2c_add_driver(&apds9802als_driver); | ||
} | ||
|
||
static void __exit sensor_apds9802als_exit(void) | ||
{ | ||
i2c_del_driver(&apds9802als_driver); | ||
} | ||
module_init(sensor_apds9802als_init); | ||
module_exit(sensor_apds9802als_exit); | ||
module_i2c_driver(apds9802als_driver); | ||
|
||
MODULE_AUTHOR("Anantha Narayanan <[email protected]"); | ||
MODULE_DESCRIPTION("Avago apds9802als ALS 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
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 |
---|---|---|
|
@@ -464,20 +464,8 @@ static struct i2c_driver bmp085_driver = { | |
.address_list = normal_i2c | ||
}; | ||
|
||
static int __init bmp085_init(void) | ||
{ | ||
return i2c_add_driver(&bmp085_driver); | ||
} | ||
|
||
static void __exit bmp085_exit(void) | ||
{ | ||
i2c_del_driver(&bmp085_driver); | ||
} | ||
|
||
module_i2c_driver(bmp085_driver); | ||
|
||
MODULE_AUTHOR("Christoph Mair <[email protected]"); | ||
MODULE_DESCRIPTION("BMP085 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(bmp085_init); | ||
module_exit(bmp085_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 |
---|---|---|
|
@@ -250,19 +250,8 @@ static struct i2c_driver ds1682_driver = { | |
.id_table = ds1682_id, | ||
}; | ||
|
||
static int __init ds1682_init(void) | ||
{ | ||
return i2c_add_driver(&ds1682_driver); | ||
} | ||
|
||
static void __exit ds1682_exit(void) | ||
{ | ||
i2c_del_driver(&ds1682_driver); | ||
} | ||
module_i2c_driver(ds1682_driver); | ||
|
||
MODULE_AUTHOR("Grant Likely <[email protected]>"); | ||
MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(ds1682_init); | ||
module_exit(ds1682_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 |
---|---|---|
|
@@ -229,22 +229,10 @@ static struct i2c_driver eeprom_driver = { | |
.address_list = normal_i2c, | ||
}; | ||
|
||
static int __init eeprom_init(void) | ||
{ | ||
return i2c_add_driver(&eeprom_driver); | ||
} | ||
|
||
static void __exit eeprom_exit(void) | ||
{ | ||
i2c_del_driver(&eeprom_driver); | ||
} | ||
|
||
module_i2c_driver(eeprom_driver); | ||
|
||
MODULE_AUTHOR("Frodo Looijaard <[email protected]> and " | ||
"Philip Edelbrock <[email protected]> and " | ||
"Greg Kroah-Hartman <[email protected]>"); | ||
MODULE_DESCRIPTION("I2C EEPROM driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(eeprom_init); | ||
module_exit(eeprom_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 |
---|---|---|
|
@@ -208,20 +208,8 @@ static struct i2c_driver max6875_driver = { | |
.id_table = max6875_id, | ||
}; | ||
|
||
static int __init max6875_init(void) | ||
{ | ||
return i2c_add_driver(&max6875_driver); | ||
} | ||
|
||
static void __exit max6875_exit(void) | ||
{ | ||
i2c_del_driver(&max6875_driver); | ||
} | ||
|
||
module_i2c_driver(max6875_driver); | ||
|
||
MODULE_AUTHOR("Ben Gardner <[email protected]>"); | ||
MODULE_DESCRIPTION("MAX6875 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(max6875_init); | ||
module_exit(max6875_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 |
---|---|---|
|
@@ -541,17 +541,7 @@ static struct i2c_driver fsa9480_i2c_driver = { | |
.id_table = fsa9480_id, | ||
}; | ||
|
||
static int __init fsa9480_init(void) | ||
{ | ||
return i2c_add_driver(&fsa9480_i2c_driver); | ||
} | ||
module_init(fsa9480_init); | ||
|
||
static void __exit fsa9480_exit(void) | ||
{ | ||
i2c_del_driver(&fsa9480_i2c_driver); | ||
} | ||
module_exit(fsa9480_exit); | ||
module_i2c_driver(fsa9480_i2c_driver); | ||
|
||
MODULE_AUTHOR("Minkyu Kang <[email protected]>"); | ||
MODULE_DESCRIPTION("FSA9480 USB Switch 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 |
---|---|---|
|
@@ -148,18 +148,7 @@ static struct i2c_driver hmc6352_driver = { | |
.id_table = hmc6352_id, | ||
}; | ||
|
||
static int __init sensor_hmc6352_init(void) | ||
{ | ||
return i2c_add_driver(&hmc6352_driver); | ||
} | ||
|
||
static void __exit sensor_hmc6352_exit(void) | ||
{ | ||
i2c_del_driver(&hmc6352_driver); | ||
} | ||
|
||
module_init(sensor_hmc6352_init); | ||
module_exit(sensor_hmc6352_exit); | ||
module_i2c_driver(hmc6352_driver); | ||
|
||
MODULE_AUTHOR("Kalhan Trisal <[email protected]"); | ||
MODULE_DESCRIPTION("hmc6352 Compass 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 |
---|---|---|
|
@@ -480,23 +480,12 @@ static int ics932s401_remove(struct i2c_client *client) | |
return 0; | ||
} | ||
|
||
static int __init ics932s401_init(void) | ||
{ | ||
return i2c_add_driver(&ics932s401_driver); | ||
} | ||
|
||
static void __exit ics932s401_exit(void) | ||
{ | ||
i2c_del_driver(&ics932s401_driver); | ||
} | ||
module_i2c_driver(ics932s401_driver); | ||
|
||
MODULE_AUTHOR("Darrick J. Wong <[email protected]>"); | ||
MODULE_DESCRIPTION("ICS932S401 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(ics932s401_init); | ||
module_exit(ics932s401_exit); | ||
|
||
/* IBM IntelliStation Z30 */ | ||
MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*"); | ||
MODULE_ALIAS("dmi:bvnIBM:*:rn9232:*"); | ||
|
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 |
---|---|---|
|
@@ -455,21 +455,9 @@ static struct i2c_driver isl29003_driver = { | |
.id_table = isl29003_id, | ||
}; | ||
|
||
static int __init isl29003_init(void) | ||
{ | ||
return i2c_add_driver(&isl29003_driver); | ||
} | ||
|
||
static void __exit isl29003_exit(void) | ||
{ | ||
i2c_del_driver(&isl29003_driver); | ||
} | ||
module_i2c_driver(isl29003_driver); | ||
|
||
MODULE_AUTHOR("Daniel Mack <[email protected]>"); | ||
MODULE_DESCRIPTION("ISL29003 ambient light sensor driver"); | ||
MODULE_LICENSE("GPL v2"); | ||
MODULE_VERSION(DRIVER_VERSION); | ||
|
||
module_init(isl29003_init); | ||
module_exit(isl29003_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 |
---|---|---|
|
@@ -230,18 +230,7 @@ static struct i2c_driver isl29020_driver = { | |
.id_table = isl29020_id, | ||
}; | ||
|
||
static int __init sensor_isl29020_init(void) | ||
{ | ||
return i2c_add_driver(&isl29020_driver); | ||
} | ||
|
||
static void __exit sensor_isl29020_exit(void) | ||
{ | ||
i2c_del_driver(&isl29020_driver); | ||
} | ||
|
||
module_init(sensor_isl29020_init); | ||
module_exit(sensor_isl29020_exit); | ||
module_i2c_driver(isl29020_driver); | ||
|
||
MODULE_AUTHOR("Kalhan Trisal <[email protected]>"); | ||
MODULE_DESCRIPTION("Intersil isl29020 ALS 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 |
---|---|---|
|
@@ -454,20 +454,9 @@ static struct i2c_driver tsl2550_driver = { | |
.id_table = tsl2550_id, | ||
}; | ||
|
||
static int __init tsl2550_init(void) | ||
{ | ||
return i2c_add_driver(&tsl2550_driver); | ||
} | ||
|
||
static void __exit tsl2550_exit(void) | ||
{ | ||
i2c_del_driver(&tsl2550_driver); | ||
} | ||
module_i2c_driver(tsl2550_driver); | ||
|
||
MODULE_AUTHOR("Rodolfo Giometti <[email protected]>"); | ||
MODULE_DESCRIPTION("TSL2550 ambient light sensor driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRIVER_VERSION); | ||
|
||
module_init(tsl2550_init); | ||
module_exit(tsl2550_exit); |