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.
hwmon: convert drivers/hwmon/* to use module_i2c_driver()
This patch converts the drivers in drivers/hwmon/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Cc: Corentin Labbe <[email protected]> Cc: Dirk Eibach <[email protected]> Cc: "Mark M. Hoffman" <[email protected]> Cc: Steve Glendinning <[email protected]> Cc: Riku Voipio <[email protected]> Cc: Guillaume Ligneul <[email protected]> Cc: David George <[email protected]> Cc: "Hans J. Koch" <[email protected]> Cc: Marc Hulsman <[email protected]> Cc: Rudolf Marek <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
- Loading branch information
Showing
74 changed files
with
74 additions
and
909 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
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 |
---|---|---|
|
@@ -295,20 +295,9 @@ static int ad7418_remove(struct i2c_client *client) | |
return 0; | ||
} | ||
|
||
static int __init ad7418_init(void) | ||
{ | ||
return i2c_add_driver(&ad7418_driver); | ||
} | ||
|
||
static void __exit ad7418_exit(void) | ||
{ | ||
i2c_del_driver(&ad7418_driver); | ||
} | ||
module_i2c_driver(ad7418_driver); | ||
|
||
MODULE_AUTHOR("Alessandro Zummo <[email protected]>"); | ||
MODULE_DESCRIPTION("AD7416/17/18 driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(DRV_VERSION); | ||
|
||
module_init(ad7418_init); | ||
module_exit(ad7418_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 |
---|---|---|
|
@@ -451,15 +451,7 @@ static struct adm1021_data *adm1021_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
static int __init sensors_adm1021_init(void) | ||
{ | ||
return i2c_add_driver(&adm1021_driver); | ||
} | ||
|
||
static void __exit sensors_adm1021_exit(void) | ||
{ | ||
i2c_del_driver(&adm1021_driver); | ||
} | ||
module_i2c_driver(adm1021_driver); | ||
|
||
MODULE_AUTHOR ("Frodo Looijaard <[email protected]> and " | ||
"Philip Edelbrock <[email protected]>"); | ||
|
@@ -468,6 +460,3 @@ MODULE_LICENSE("GPL"); | |
|
||
module_param(read_only, bool, 0); | ||
MODULE_PARM_DESC(read_only, "Don't set any values, read only mode"); | ||
|
||
module_init(sensors_adm1021_init) | ||
module_exit(sensors_adm1021_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 |
---|---|---|
|
@@ -618,19 +618,8 @@ static struct adm1025_data *adm1025_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
static int __init sensors_adm1025_init(void) | ||
{ | ||
return i2c_add_driver(&adm1025_driver); | ||
} | ||
|
||
static void __exit sensors_adm1025_exit(void) | ||
{ | ||
i2c_del_driver(&adm1025_driver); | ||
} | ||
module_i2c_driver(adm1025_driver); | ||
|
||
MODULE_AUTHOR("Jean Delvare <[email protected]>"); | ||
MODULE_DESCRIPTION("ADM1025 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sensors_adm1025_init); | ||
module_exit(sensors_adm1025_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 |
---|---|---|
|
@@ -1761,20 +1761,9 @@ static int adm1026_remove(struct i2c_client *client) | |
return 0; | ||
} | ||
|
||
static int __init sm_adm1026_init(void) | ||
{ | ||
return i2c_add_driver(&adm1026_driver); | ||
} | ||
|
||
static void __exit sm_adm1026_exit(void) | ||
{ | ||
i2c_del_driver(&adm1026_driver); | ||
} | ||
module_i2c_driver(adm1026_driver); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Philip Pokorny <[email protected]>, " | ||
"Justin Thiessen <[email protected]>"); | ||
MODULE_DESCRIPTION("ADM1026 driver"); | ||
|
||
module_init(sm_adm1026_init); | ||
module_exit(sm_adm1026_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 |
---|---|---|
|
@@ -450,24 +450,8 @@ static struct adm1029_data *adm1029_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
/* | ||
Common module stuff | ||
*/ | ||
static int __init sensors_adm1029_init(void) | ||
{ | ||
|
||
return i2c_add_driver(&adm1029_driver); | ||
} | ||
|
||
static void __exit sensors_adm1029_exit(void) | ||
{ | ||
|
||
i2c_del_driver(&adm1029_driver); | ||
} | ||
module_i2c_driver(adm1029_driver); | ||
|
||
MODULE_AUTHOR("Corentin LABBE <[email protected]>"); | ||
MODULE_DESCRIPTION("adm1029 driver"); | ||
MODULE_LICENSE("GPL v2"); | ||
|
||
module_init(sensors_adm1029_init); | ||
module_exit(sensors_adm1029_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 |
---|---|---|
|
@@ -1131,19 +1131,8 @@ static struct adm1031_data *adm1031_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
static int __init sensors_adm1031_init(void) | ||
{ | ||
return i2c_add_driver(&adm1031_driver); | ||
} | ||
|
||
static void __exit sensors_adm1031_exit(void) | ||
{ | ||
i2c_del_driver(&adm1031_driver); | ||
} | ||
module_i2c_driver(adm1031_driver); | ||
|
||
MODULE_AUTHOR("Alexandre d'Alton <[email protected]>"); | ||
MODULE_DESCRIPTION("ADM1031/ADM1030 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sensors_adm1031_init); | ||
module_exit(sensors_adm1031_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 |
---|---|---|
|
@@ -795,21 +795,9 @@ static struct adm9240_data *adm9240_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
static int __init sensors_adm9240_init(void) | ||
{ | ||
return i2c_add_driver(&adm9240_driver); | ||
} | ||
|
||
static void __exit sensors_adm9240_exit(void) | ||
{ | ||
i2c_del_driver(&adm9240_driver); | ||
} | ||
module_i2c_driver(adm9240_driver); | ||
|
||
MODULE_AUTHOR("Michiel Rook <[email protected]>, " | ||
"Grant Coady <[email protected]> and others"); | ||
MODULE_DESCRIPTION("ADM9240/DS1780/LM81 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sensors_adm9240_init); | ||
module_exit(sensors_adm9240_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 |
---|---|---|
|
@@ -305,19 +305,8 @@ static struct i2c_driver ads1015_driver = { | |
.id_table = ads1015_id, | ||
}; | ||
|
||
static int __init sensors_ads1015_init(void) | ||
{ | ||
return i2c_add_driver(&ads1015_driver); | ||
} | ||
|
||
static void __exit sensors_ads1015_exit(void) | ||
{ | ||
i2c_del_driver(&ads1015_driver); | ||
} | ||
module_i2c_driver(ads1015_driver); | ||
|
||
MODULE_AUTHOR("Dirk Eibach <[email protected]>"); | ||
MODULE_DESCRIPTION("ADS1015 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sensors_ads1015_init); | ||
module_exit(sensors_ads1015_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 |
---|---|---|
|
@@ -348,17 +348,7 @@ static struct i2c_driver adt7411_driver = { | |
.class = I2C_CLASS_HWMON, | ||
}; | ||
|
||
static int __init sensors_adt7411_init(void) | ||
{ | ||
return i2c_add_driver(&adt7411_driver); | ||
} | ||
module_init(sensors_adt7411_init) | ||
|
||
static void __exit sensors_adt7411_exit(void) | ||
{ | ||
i2c_del_driver(&adt7411_driver); | ||
} | ||
module_exit(sensors_adt7411_exit) | ||
module_i2c_driver(adt7411_driver); | ||
|
||
MODULE_AUTHOR("Sascha Hauer <[email protected]> and " | ||
"Wolfram Sang <[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 |
---|---|---|
|
@@ -1975,19 +1975,8 @@ static int adt7462_remove(struct i2c_client *client) | |
return 0; | ||
} | ||
|
||
static int __init adt7462_init(void) | ||
{ | ||
return i2c_add_driver(&adt7462_driver); | ||
} | ||
|
||
static void __exit adt7462_exit(void) | ||
{ | ||
i2c_del_driver(&adt7462_driver); | ||
} | ||
module_i2c_driver(adt7462_driver); | ||
|
||
MODULE_AUTHOR("Darrick J. Wong <[email protected]>"); | ||
MODULE_DESCRIPTION("ADT7462 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(adt7462_init); | ||
module_exit(adt7462_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 |
---|---|---|
|
@@ -1317,19 +1317,8 @@ static int adt7470_remove(struct i2c_client *client) | |
return 0; | ||
} | ||
|
||
static int __init adt7470_init(void) | ||
{ | ||
return i2c_add_driver(&adt7470_driver); | ||
} | ||
|
||
static void __exit adt7470_exit(void) | ||
{ | ||
i2c_del_driver(&adt7470_driver); | ||
} | ||
module_i2c_driver(adt7470_driver); | ||
|
||
MODULE_AUTHOR("Darrick J. Wong <[email protected]>"); | ||
MODULE_DESCRIPTION("ADT7470 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(adt7470_init); | ||
module_exit(adt7470_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 |
---|---|---|
|
@@ -1095,20 +1095,7 @@ static struct amc6821_data *amc6821_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
|
||
static int __init amc6821_init(void) | ||
{ | ||
return i2c_add_driver(&amc6821_driver); | ||
} | ||
|
||
static void __exit amc6821_exit(void) | ||
{ | ||
i2c_del_driver(&amc6821_driver); | ||
} | ||
|
||
module_init(amc6821_init); | ||
module_exit(amc6821_exit); | ||
|
||
module_i2c_driver(amc6821_driver); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("T. Mertelj <[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 |
---|---|---|
|
@@ -971,19 +971,8 @@ static struct asb100_data *asb100_update_device(struct device *dev) | |
return data; | ||
} | ||
|
||
static int __init asb100_init(void) | ||
{ | ||
return i2c_add_driver(&asb100_driver); | ||
} | ||
|
||
static void __exit asb100_exit(void) | ||
{ | ||
i2c_del_driver(&asb100_driver); | ||
} | ||
module_i2c_driver(asb100_driver); | ||
|
||
MODULE_AUTHOR("Mark M. Hoffman <[email protected]>"); | ||
MODULE_DESCRIPTION("ASB100 Bach driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(asb100_init); | ||
module_exit(asb100_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 |
---|---|---|
|
@@ -305,20 +305,8 @@ static struct i2c_driver ds1621_driver = { | |
.address_list = normal_i2c, | ||
}; | ||
|
||
static int __init ds1621_init(void) | ||
{ | ||
return i2c_add_driver(&ds1621_driver); | ||
} | ||
|
||
static void __exit ds1621_exit(void) | ||
{ | ||
i2c_del_driver(&ds1621_driver); | ||
} | ||
|
||
module_i2c_driver(ds1621_driver); | ||
|
||
MODULE_AUTHOR("Christian W. Zuckschwerdt <[email protected]>"); | ||
MODULE_DESCRIPTION("DS1621 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(ds1621_init); | ||
module_exit(ds1621_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 |
---|---|---|
|
@@ -297,19 +297,8 @@ static struct i2c_driver ds620_driver = { | |
.id_table = ds620_id, | ||
}; | ||
|
||
static int __init ds620_init(void) | ||
{ | ||
return i2c_add_driver(&ds620_driver); | ||
} | ||
|
||
static void __exit ds620_exit(void) | ||
{ | ||
i2c_del_driver(&ds620_driver); | ||
} | ||
module_i2c_driver(ds620_driver); | ||
|
||
MODULE_AUTHOR("Roland Stigge <[email protected]>"); | ||
MODULE_DESCRIPTION("DS620 driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(ds620_init); | ||
module_exit(ds620_exit); |
Oops, something went wrong.