提交 f0967eea 编写于 作者: A Axel Lin 提交者: Guenter Roeck

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: NAxel Lin <axel.lin@gmail.com>
Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com>
Cc: David George <david.george@ska.ac.za>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 61ba0318
......@@ -256,17 +256,7 @@ static struct i2c_driver ad7414_driver = {
.id_table = ad7414_id,
};
static int __init ad7414_init(void)
{
return i2c_add_driver(&ad7414_driver);
}
module_init(ad7414_init);
static void __exit ad7414_exit(void)
{
i2c_del_driver(&ad7414_driver);
}
module_exit(ad7414_exit);
module_i2c_driver(ad7414_driver);
MODULE_AUTHOR("Stefan Roese <sr at denx.de>, "
"Frank Edelhaeuser <frank.edelhaeuser at spansion.com>");
......
......@@ -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 <a.zummo@towertech.it>");
MODULE_DESCRIPTION("AD7416/17/18 driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
module_init(ad7418_init);
module_exit(ad7418_exit);
......@@ -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 <frodol@dds.nl> and "
"Philip Edelbrock <phil@netroedge.com>");
......@@ -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)
......@@ -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 <khali@linux-fr.org>");
MODULE_DESCRIPTION("ADM1025 driver");
MODULE_LICENSE("GPL");
module_init(sensors_adm1025_init);
module_exit(sensors_adm1025_exit);
......@@ -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 <ppokorny@penguincomputing.com>, "
"Justin Thiessen <jthiessen@penguincomputing.com>");
MODULE_DESCRIPTION("ADM1026 driver");
module_init(sm_adm1026_init);
module_exit(sm_adm1026_exit);
......@@ -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 <corentin.labbe@geomatys.fr>");
MODULE_DESCRIPTION("adm1029 driver");
MODULE_LICENSE("GPL v2");
module_init(sensors_adm1029_init);
module_exit(sensors_adm1029_exit);
......@@ -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 <alex@alexdalton.org>");
MODULE_DESCRIPTION("ADM1031/ADM1030 driver");
MODULE_LICENSE("GPL");
module_init(sensors_adm1031_init);
module_exit(sensors_adm1031_exit);
......@@ -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 <michiel@grendelproject.nl>, "
"Grant Coady <gcoady.lk@gmail.com> and others");
MODULE_DESCRIPTION("ADM9240/DS1780/LM81 driver");
MODULE_LICENSE("GPL");
module_init(sensors_adm9240_init);
module_exit(sensors_adm9240_exit);
......@@ -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 <eibach@gdsys.de>");
MODULE_DESCRIPTION("ADS1015 driver");
MODULE_LICENSE("GPL");
module_init(sensors_ads1015_init);
module_exit(sensors_ads1015_exit);
......@@ -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 <s.hauer@pengutronix.de> and "
"Wolfram Sang <w.sang@pengutronix.de>");
......
......@@ -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 <djwong@us.ibm.com>");
MODULE_DESCRIPTION("ADT7462 driver");
MODULE_LICENSE("GPL");
module_init(adt7462_init);
module_exit(adt7462_exit);
......@@ -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 <djwong@us.ibm.com>");
MODULE_DESCRIPTION("ADT7470 driver");
MODULE_LICENSE("GPL");
module_init(adt7470_init);
module_exit(adt7470_exit);
......@@ -1626,19 +1626,8 @@ static struct adt7475_data *adt7475_update_device(struct device *dev)
return data;
}
static int __init sensors_adt7475_init(void)
{
return i2c_add_driver(&adt7475_driver);
}
static void __exit sensors_adt7475_exit(void)
{
i2c_del_driver(&adt7475_driver);
}
module_i2c_driver(adt7475_driver);
MODULE_AUTHOR("Advanced Micro Devices, Inc");
MODULE_DESCRIPTION("adt7475 driver");
MODULE_LICENSE("GPL");
module_init(sensors_adt7475_init);
module_exit(sensors_adt7475_exit);
......@@ -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 <tomaz.mertelj@guest.arnes.si>");
......
......@@ -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 <mhoffman@lightlink.com>");
MODULE_DESCRIPTION("ASB100 Bach driver");
MODULE_LICENSE("GPL");
module_init(asb100_init);
module_exit(asb100_exit);
......@@ -367,15 +367,4 @@ static int atxp1_remove(struct i2c_client *client)
return 0;
};
static int __init atxp1_init(void)
{
return i2c_add_driver(&atxp1_driver);
};
static void __exit atxp1_exit(void)
{
i2c_del_driver(&atxp1_driver);
};
module_init(atxp1_init);
module_exit(atxp1_exit);
module_i2c_driver(atxp1_driver);
......@@ -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 <zany@triq.net>");
MODULE_DESCRIPTION("DS1621 driver");
MODULE_LICENSE("GPL");
module_init(ds1621_init);
module_exit(ds1621_exit);
......@@ -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 <stigge@antcom.de>");
MODULE_DESCRIPTION("DS620 driver");
MODULE_LICENSE("GPL");
module_init(ds620_init);
module_exit(ds620_exit);
......@@ -366,18 +366,7 @@ static struct i2c_driver sensor_emc1403 = {
.address_list = emc1403_address_list,
};
static int __init sensor_emc1403_init(void)
{
return i2c_add_driver(&sensor_emc1403);
}
static void __exit sensor_emc1403_exit(void)
{
i2c_del_driver(&sensor_emc1403);
}
module_init(sensor_emc1403_init);
module_exit(sensor_emc1403_exit);
module_i2c_driver(sensor_emc1403);
MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com");
MODULE_DESCRIPTION("emc1403 Thermal Driver");
......
......@@ -722,19 +722,8 @@ static struct i2c_driver emc2103_driver = {
.address_list = normal_i2c,
};
static int __init sensors_emc2103_init(void)
{
return i2c_add_driver(&emc2103_driver);
}
static void __exit sensors_emc2103_exit(void)
{
i2c_del_driver(&emc2103_driver);
}
module_i2c_driver(emc2103_driver);
MODULE_AUTHOR("Steve Glendinning <steve.glendinning@smsc.com>");
MODULE_DESCRIPTION("SMSC EMC2103 hwmon driver");
MODULE_LICENSE("GPL");
module_init(sensors_emc2103_init);
module_exit(sensors_emc2103_exit);
......@@ -552,17 +552,7 @@ static struct i2c_driver emc6w201_driver = {
.address_list = normal_i2c,
};
static int __init sensors_emc6w201_init(void)
{
return i2c_add_driver(&emc6w201_driver);
}
module_init(sensors_emc6w201_init);
static void __exit sensors_emc6w201_exit(void)
{
i2c_del_driver(&emc6w201_driver);
}
module_exit(sensors_emc6w201_exit);
module_i2c_driver(emc6w201_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("SMSC EMC6W201 hardware monitoring driver");
......
......@@ -917,19 +917,8 @@ static int f75375_detect(struct i2c_client *client,
return 0;
}
static int __init sensors_f75375_init(void)
{
return i2c_add_driver(&f75375_driver);
}
static void __exit sensors_f75375_exit(void)
{
i2c_del_driver(&f75375_driver);
}
module_i2c_driver(f75375_driver);
MODULE_AUTHOR("Riku Voipio");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("F75373/F75375/F75387 hardware monitoring driver");
module_init(sensors_f75375_init);
module_exit(sensors_f75375_exit);
......@@ -1314,20 +1314,9 @@ static struct fschmd_data *fschmd_update_device(struct device *dev)
return data;
}
static int __init fschmd_init(void)
{
return i2c_add_driver(&fschmd_driver);
}
static void __exit fschmd_exit(void)
{
i2c_del_driver(&fschmd_driver);
}
module_i2c_driver(fschmd_driver);
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
MODULE_DESCRIPTION("FSC Poseidon, Hermes, Scylla, Heracles, Heimdall, Hades "
"and Syleus driver");
MODULE_LICENSE("GPL");
module_init(fschmd_init);
module_exit(fschmd_exit);
......@@ -250,21 +250,8 @@ static int g760a_remove(struct i2c_client *client)
return 0;
}
/* module management */
static int __init g760a_init(void)
{
return i2c_add_driver(&g760a_driver);
}
static void __exit g760a_exit(void)
{
i2c_del_driver(&g760a_driver);
}
module_i2c_driver(g760a_driver);
MODULE_AUTHOR("Herbert Valerio Riedel <hvr@gnu.org>");
MODULE_DESCRIPTION("GMT G760A driver");
MODULE_LICENSE("GPL");
module_init(g760a_init);
module_exit(g760a_exit);
......@@ -676,21 +676,10 @@ static struct gl518_data *gl518_update_device(struct device *dev)
return data;
}
static int __init sensors_gl518sm_init(void)
{
return i2c_add_driver(&gl518_driver);
}
static void __exit sensors_gl518sm_exit(void)
{
i2c_del_driver(&gl518_driver);
}
module_i2c_driver(gl518_driver);
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
"Kyosti Malkki <kmalkki@cc.hut.fi> and "
"Hong-Gunn Chew <hglinux@gunnet.org>");
MODULE_DESCRIPTION("GL518SM driver");
MODULE_LICENSE("GPL");
module_init(sensors_gl518sm_init);
module_exit(sensors_gl518sm_exit);
......@@ -910,23 +910,10 @@ static struct gl520_data *gl520_update_device(struct device *dev)
return data;
}
static int __init sensors_gl520sm_init(void)
{
return i2c_add_driver(&gl520_driver);
}
static void __exit sensors_gl520sm_exit(void)
{
i2c_del_driver(&gl520_driver);
}
module_i2c_driver(gl520_driver);
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
"Kyösti Mälkki <kmalkki@cc.hut.fi>, "
"Maarten Deprez <maartendeprez@users.sourceforge.net>");
MODULE_DESCRIPTION("GL520SM driver");
MODULE_LICENSE("GPL");
module_init(sensors_gl520sm_init);
module_exit(sensors_gl520sm_exit);
......@@ -614,19 +614,8 @@ static struct jc42_data *jc42_update_device(struct device *dev)
return ret;
}
static int __init sensors_jc42_init(void)
{
return i2c_add_driver(&jc42_driver);
}
static void __exit sensors_jc42_exit(void)
{
i2c_del_driver(&jc42_driver);
}
module_i2c_driver(jc42_driver);
MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_DESCRIPTION("JC42 driver");
MODULE_LICENSE("GPL");
module_init(sensors_jc42_init);
module_exit(sensors_jc42_exit);
......@@ -568,19 +568,8 @@ static struct i2c_driver pem_driver = {
.id_table = pem_id,
};
static int __init pem_init(void)
{
return i2c_add_driver(&pem_driver);
}
static void __exit pem_exit(void)
{
i2c_del_driver(&pem_driver);
}
module_i2c_driver(pem_driver);
MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_DESCRIPTION("Lineage CPL PEM hardware monitoring driver");
MODULE_LICENSE("GPL");
module_init(pem_init);
module_exit(pem_exit);
......@@ -1119,19 +1119,8 @@ static struct lm63_data *lm63_update_device(struct device *dev)
return data;
}
static int __init sensors_lm63_init(void)
{
return i2c_add_driver(&lm63_driver);
}
static void __exit sensors_lm63_exit(void)
{
i2c_del_driver(&lm63_driver);
}
module_i2c_driver(lm63_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("LM63 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm63_init);
module_exit(sensors_lm63_exit);
......@@ -194,21 +194,8 @@ static struct i2c_driver lm73_driver = {
.address_list = normal_i2c,
};
/* module glue */
static int __init sensors_lm73_init(void)
{
return i2c_add_driver(&lm73_driver);
}
static void __exit sensors_lm73_exit(void)
{
i2c_del_driver(&lm73_driver);
}
module_i2c_driver(lm73_driver);
MODULE_AUTHOR("Guillaume Ligneul <guillaume.ligneul@gmail.com>");
MODULE_DESCRIPTION("LM73 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm73_init);
module_exit(sensors_lm73_exit);
......@@ -438,23 +438,8 @@ static struct lm75_data *lm75_update_device(struct device *dev)
return ret;
}
/*-----------------------------------------------------------------------*/
/* module glue */
static int __init sensors_lm75_init(void)
{
return i2c_add_driver(&lm75_driver);
}
static void __exit sensors_lm75_exit(void)
{
i2c_del_driver(&lm75_driver);
}
module_i2c_driver(lm75_driver);
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
MODULE_DESCRIPTION("LM75 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm75_init);
module_exit(sensors_lm75_exit);
......@@ -420,19 +420,8 @@ static struct lm77_data *lm77_update_device(struct device *dev)
return data;
}
static int __init sensors_lm77_init(void)
{
return i2c_add_driver(&lm77_driver);
}
static void __exit sensors_lm77_exit(void)
{
i2c_del_driver(&lm77_driver);
}
module_i2c_driver(lm77_driver);
MODULE_AUTHOR("Andras BALI <drewie@freemail.hu>");
MODULE_DESCRIPTION("LM77 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm77_init);
module_exit(sensors_lm77_exit);
......@@ -697,20 +697,9 @@ static struct lm80_data *lm80_update_device(struct device *dev)
return ret;
}
static int __init sensors_lm80_init(void)
{
return i2c_add_driver(&lm80_driver);
}
static void __exit sensors_lm80_exit(void)
{
i2c_del_driver(&lm80_driver);
}
module_i2c_driver(lm80_driver);
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "
"Philip Edelbrock <phil@netroedge.com>");
MODULE_DESCRIPTION("LM80 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm80_init);
module_exit(sensors_lm80_exit);
......@@ -430,19 +430,8 @@ static struct lm83_data *lm83_update_device(struct device *dev)
return data;
}
static int __init sensors_lm83_init(void)
{
return i2c_add_driver(&lm83_driver);
}
static void __exit sensors_lm83_exit(void)
{
i2c_del_driver(&lm83_driver);
}
module_i2c_driver(lm83_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("LM83 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm83_init);
module_exit(sensors_lm83_exit);
......@@ -1611,22 +1611,10 @@ static struct lm85_data *lm85_update_device(struct device *dev)
return data;
}
static int __init sm_lm85_init(void)
{
return i2c_add_driver(&lm85_driver);
}
static void __exit sm_lm85_exit(void)
{
i2c_del_driver(&lm85_driver);
}
module_i2c_driver(lm85_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Philip Pokorny <ppokorny@penguincomputing.com>, "
"Margit Schubert-While <margitsw@t-online.de>, "
"Justin Thiessen <jthiessen@penguincomputing.com>");
MODULE_DESCRIPTION("LM85-B, LM85-C driver");
module_init(sm_lm85_init);
module_exit(sm_lm85_exit);
......@@ -963,19 +963,8 @@ static struct lm87_data *lm87_update_device(struct device *dev)
return data;
}
static int __init sensors_lm87_init(void)
{
return i2c_add_driver(&lm87_driver);
}
static void __exit sensors_lm87_exit(void)
{
i2c_del_driver(&lm87_driver);
}
module_i2c_driver(lm87_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org> and others");
MODULE_DESCRIPTION("LM87 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm87_init);
module_exit(sensors_lm87_exit);
......@@ -1514,19 +1514,8 @@ static struct i2c_driver lm90_driver = {
.address_list = normal_i2c,
};
static int __init sensors_lm90_init(void)
{
return i2c_add_driver(&lm90_driver);
}
static void __exit sensors_lm90_exit(void)
{
i2c_del_driver(&lm90_driver);
}
module_i2c_driver(lm90_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("LM90/ADM1032 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm90_init);
module_exit(sensors_lm90_exit);
......@@ -416,19 +416,8 @@ static struct i2c_driver lm92_driver = {
.address_list = normal_i2c,
};
static int __init sensors_lm92_init(void)
{
return i2c_add_driver(&lm92_driver);
}
static void __exit sensors_lm92_exit(void)
{
i2c_del_driver(&lm92_driver);
}
module_i2c_driver(lm92_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("LM92/MAX6635 driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm92_init);
module_exit(sensors_lm92_exit);
......@@ -2635,20 +2635,9 @@ static struct i2c_driver lm93_driver = {
.address_list = normal_i2c,
};
static int __init lm93_init(void)
{
return i2c_add_driver(&lm93_driver);
}
static void __exit lm93_exit(void)
{
i2c_del_driver(&lm93_driver);
}
module_i2c_driver(lm93_driver);
MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>, "
"Hans J. Koch <hjk@hansjkoch.de>");
MODULE_DESCRIPTION("LM93 driver");
MODULE_LICENSE("GPL");
module_init(lm93_init);
module_exit(lm93_exit);
......@@ -455,19 +455,8 @@ static struct i2c_driver lm95241_driver = {
.address_list = normal_i2c,
};
static int __init sensors_lm95241_init(void)
{
return i2c_add_driver(&lm95241_driver);
}
static void __exit sensors_lm95241_exit(void)
{
i2c_del_driver(&lm95241_driver);
}
module_i2c_driver(lm95241_driver);
MODULE_AUTHOR("Davide Rizzo <elpa.rizzo@gmail.com>");
MODULE_DESCRIPTION("LM95241 sensor driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm95241_init);
module_exit(sensors_lm95241_exit);
......@@ -525,19 +525,8 @@ static struct i2c_driver lm95245_driver = {
.address_list = normal_i2c,
};
static int __init sensors_lm95245_init(void)
{
return i2c_add_driver(&lm95245_driver);
}
static void __exit sensors_lm95245_exit(void)
{
i2c_del_driver(&lm95245_driver);
}
module_i2c_driver(lm95245_driver);
MODULE_AUTHOR("Alexander Stein <alexander.stein@systec-electronic.com>");
MODULE_DESCRIPTION("LM95245 sensor driver");
MODULE_LICENSE("GPL");
module_init(sensors_lm95245_init);
module_exit(sensors_lm95245_exit);
......@@ -238,19 +238,8 @@ static struct i2c_driver ltc4151_driver = {
.id_table = ltc4151_id,
};
static int __init ltc4151_init(void)
{
return i2c_add_driver(&ltc4151_driver);
}
static void __exit ltc4151_exit(void)
{
i2c_del_driver(&ltc4151_driver);
}
module_i2c_driver(ltc4151_driver);
MODULE_AUTHOR("Per Dalen <per.dalen@appeartv.com>");
MODULE_DESCRIPTION("LTC4151 driver");
MODULE_LICENSE("GPL");
module_init(ltc4151_init);
module_exit(ltc4151_exit);
......@@ -309,19 +309,8 @@ static struct i2c_driver ltc4215_driver = {
.id_table = ltc4215_id,
};
static int __init ltc4215_init(void)
{
return i2c_add_driver(&ltc4215_driver);
}
static void __exit ltc4215_exit(void)
{
i2c_del_driver(&ltc4215_driver);
}
module_i2c_driver(ltc4215_driver);
MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("LTC4215 driver");
MODULE_LICENSE("GPL");
module_init(ltc4215_init);
module_exit(ltc4215_exit);
......@@ -578,19 +578,8 @@ static struct i2c_driver ltc4245_driver = {
.id_table = ltc4245_id,
};
static int __init ltc4245_init(void)
{
return i2c_add_driver(&ltc4245_driver);
}
static void __exit ltc4245_exit(void)
{
i2c_del_driver(&ltc4245_driver);
}
module_i2c_driver(ltc4245_driver);
MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("LTC4245 driver");
MODULE_LICENSE("GPL");
module_init(ltc4245_init);
module_exit(ltc4245_exit);
......@@ -297,19 +297,8 @@ static struct i2c_driver ltc4261_driver = {
.id_table = ltc4261_id,
};
static int __init ltc4261_init(void)
{
return i2c_add_driver(&ltc4261_driver);
}
static void __exit ltc4261_exit(void)
{
i2c_del_driver(&ltc4261_driver);
}
module_i2c_driver(ltc4261_driver);
MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_DESCRIPTION("LTC4261 driver");
MODULE_LICENSE("GPL");
module_init(ltc4261_init);
module_exit(ltc4261_exit);
......@@ -699,19 +699,8 @@ static struct i2c_driver max16065_driver = {
.id_table = max16065_id,
};
static int __init max16065_init(void)
{
return i2c_add_driver(&max16065_driver);
}
static void __exit max16065_exit(void)
{
i2c_del_driver(&max16065_driver);
}
module_i2c_driver(max16065_driver);
MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_DESCRIPTION("MAX16065 driver");
MODULE_LICENSE("GPL");
module_init(max16065_init);
module_exit(max16065_exit);
......@@ -353,20 +353,9 @@ static struct max1619_data *max1619_update_device(struct device *dev)
return data;
}
static int __init sensors_max1619_init(void)
{
return i2c_add_driver(&max1619_driver);
}
static void __exit sensors_max1619_exit(void)
{
i2c_del_driver(&max1619_driver);
}
module_i2c_driver(max1619_driver);
MODULE_AUTHOR("Alexey Fisher <fishor@mail.ru> and "
"Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("MAX1619 sensor driver");
MODULE_LICENSE("GPL");
module_init(sensors_max1619_init);
module_exit(sensors_max1619_exit);
......@@ -484,19 +484,8 @@ static struct i2c_driver max1668_driver = {
.address_list = max1668_addr_list,
};
static int __init sensors_max1668_init(void)
{
return i2c_add_driver(&max1668_driver);
}
static void __exit sensors_max1668_exit(void)
{
i2c_del_driver(&max1668_driver);
}
module_i2c_driver(max1668_driver);
MODULE_AUTHOR("David George <david.george@ska.ac.za>");
MODULE_DESCRIPTION("MAX1668 remote temperature sensor driver");
MODULE_LICENSE("GPL");
module_init(sensors_max1668_init)
module_exit(sensors_max1668_exit)
......@@ -637,19 +637,8 @@ static struct i2c_driver max6639_driver = {
.address_list = normal_i2c,
};
static int __init max6639_init(void)
{
return i2c_add_driver(&max6639_driver);
}
static void __exit max6639_exit(void)
{
i2c_del_driver(&max6639_driver);
}
module_i2c_driver(max6639_driver);
MODULE_AUTHOR("Roland Stigge <stigge@antcom.de>");
MODULE_DESCRIPTION("max6639 driver");
MODULE_LICENSE("GPL");
module_init(max6639_init);
module_exit(max6639_exit);
......@@ -352,19 +352,8 @@ static struct i2c_driver max6642_driver = {
.address_list = normal_i2c,
};
static int __init max6642_init(void)
{
return i2c_add_driver(&max6642_driver);
}
static void __exit max6642_exit(void)
{
i2c_del_driver(&max6642_driver);
}
module_i2c_driver(max6642_driver);
MODULE_AUTHOR("Per Dalen <per.dalen@appeartv.com>");
MODULE_DESCRIPTION("MAX6642 sensor driver");
MODULE_LICENSE("GPL");
module_init(max6642_init);
module_exit(max6642_exit);
......@@ -731,19 +731,8 @@ static struct max6650_data *max6650_update_device(struct device *dev)
return data;
}
static int __init sensors_max6650_init(void)
{
return i2c_add_driver(&max6650_driver);
}
static void __exit sensors_max6650_exit(void)
{
i2c_del_driver(&max6650_driver);
}
module_i2c_driver(max6650_driver);
MODULE_AUTHOR("Hans J. Koch");
MODULE_DESCRIPTION("MAX6650 sensor driver");
MODULE_LICENSE("GPL");
module_init(sensors_max6650_init);
module_exit(sensors_max6650_exit);
......@@ -326,18 +326,8 @@ static struct i2c_driver adm1275_driver = {
.id_table = adm1275_id,
};
static int __init adm1275_init(void)
{
return i2c_add_driver(&adm1275_driver);
}
static void __exit adm1275_exit(void)
{
i2c_del_driver(&adm1275_driver);
}
module_i2c_driver(adm1275_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for Analog Devices ADM1275 and compatibles");
MODULE_LICENSE("GPL");
module_init(adm1275_init);
module_exit(adm1275_exit);
......@@ -334,18 +334,8 @@ static struct i2c_driver lm25066_driver = {
.id_table = lm25066_id,
};
static int __init lm25066_init(void)
{
return i2c_add_driver(&lm25066_driver);
}
static void __exit lm25066_exit(void)
{
i2c_del_driver(&lm25066_driver);
}
module_i2c_driver(lm25066_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for LM25066/LM5064/LM5066");
MODULE_LICENSE("GPL");
module_init(lm25066_init);
module_exit(lm25066_exit);
......@@ -391,18 +391,8 @@ static struct i2c_driver ltc2978_driver = {
.id_table = ltc2978_id,
};
static int __init ltc2978_init(void)
{
return i2c_add_driver(&ltc2978_driver);
}
static void __exit ltc2978_exit(void)
{
i2c_del_driver(&ltc2978_driver);
}
module_i2c_driver(ltc2978_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for LTC2978 and LTC3880");
MODULE_LICENSE("GPL");
module_init(ltc2978_init);
module_exit(ltc2978_exit);
......@@ -126,18 +126,8 @@ static struct i2c_driver max16064_driver = {
.id_table = max16064_id,
};
static int __init max16064_init(void)
{
return i2c_add_driver(&max16064_driver);
}
static void __exit max16064_exit(void)
{
i2c_del_driver(&max16064_driver);
}
module_i2c_driver(max16064_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for Maxim MAX16064");
MODULE_LICENSE("GPL");
module_init(max16064_init);
module_exit(max16064_exit);
......@@ -248,18 +248,8 @@ static struct i2c_driver max34440_driver = {
.id_table = max34440_id,
};
static int __init max34440_init(void)
{
return i2c_add_driver(&max34440_driver);
}
static void __exit max34440_exit(void)
{
i2c_del_driver(&max34440_driver);
}
module_i2c_driver(max34440_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for Maxim MAX34440/MAX34441");
MODULE_LICENSE("GPL");
module_init(max34440_init);
module_exit(max34440_exit);
......@@ -203,18 +203,8 @@ static struct i2c_driver max8688_driver = {
.id_table = max8688_id,
};
static int __init max8688_init(void)
{
return i2c_add_driver(&max8688_driver);
}
static void __exit max8688_exit(void)
{
i2c_del_driver(&max8688_driver);
}
module_i2c_driver(max8688_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for Maxim MAX8688");
MODULE_LICENSE("GPL");
module_init(max8688_init);
module_exit(max8688_exit);
......@@ -224,18 +224,8 @@ static struct i2c_driver pmbus_driver = {
.id_table = pmbus_id,
};
static int __init pmbus_init(void)
{
return i2c_add_driver(&pmbus_driver);
}
static void __exit pmbus_exit(void)
{
i2c_del_driver(&pmbus_driver);
}
module_i2c_driver(pmbus_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("Generic PMBus driver");
MODULE_LICENSE("GPL");
module_init(pmbus_init);
module_exit(pmbus_exit);
......@@ -258,18 +258,8 @@ static struct i2c_driver ucd9000_driver = {
.id_table = ucd9000_id,
};
static int __init ucd9000_init(void)
{
return i2c_add_driver(&ucd9000_driver);
}
static void __exit ucd9000_exit(void)
{
i2c_del_driver(&ucd9000_driver);
}
module_i2c_driver(ucd9000_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for TI UCD90xxx");
MODULE_LICENSE("GPL");
module_init(ucd9000_init);
module_exit(ucd9000_exit);
......@@ -190,18 +190,8 @@ static struct i2c_driver ucd9200_driver = {
.id_table = ucd9200_id,
};
static int __init ucd9200_init(void)
{
return i2c_add_driver(&ucd9200_driver);
}
static void __exit ucd9200_exit(void)
{
i2c_del_driver(&ucd9200_driver);
}
module_i2c_driver(ucd9200_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for TI UCD922x, UCD924x");
MODULE_LICENSE("GPL");
module_init(ucd9200_init);
module_exit(ucd9200_exit);
......@@ -264,18 +264,8 @@ static struct i2c_driver zl6100_driver = {
.id_table = zl6100_id,
};
static int __init zl6100_init(void)
{
return i2c_add_driver(&zl6100_driver);
}
static void __exit zl6100_exit(void)
{
i2c_del_driver(&zl6100_driver);
}
module_i2c_driver(zl6100_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("PMBus driver for ZL6100 and compatibles");
MODULE_LICENSE("GPL");
module_init(zl6100_init);
module_exit(zl6100_exit);
......@@ -261,28 +261,7 @@ static struct i2c_driver sht21_driver = {
.id_table = sht21_id,
};
/**
* sht21_init() - initialize driver
*
* Called when kernel is booted or module is inserted.
* Returns 0 on success.
*/
static int __init sht21_init(void)
{
return i2c_add_driver(&sht21_driver);
}
module_init(sht21_init);
/**
* sht21_init() - clean up driver
*
* Called when module is removed.
*/
static void __exit sht21_exit(void)
{
i2c_del_driver(&sht21_driver);
}
module_exit(sht21_exit);
module_i2c_driver(sht21_driver);
MODULE_AUTHOR("Urs Fleisch <urs.fleisch@sensirion.com>");
MODULE_DESCRIPTION("Sensirion SHT21 humidity and temperature sensor driver");
......
......@@ -718,19 +718,8 @@ static struct i2c_driver smm665_driver = {
.id_table = smm665_id,
};
static int __init smm665_init(void)
{
return i2c_add_driver(&smm665_driver);
}
static void __exit smm665_exit(void)
{
i2c_del_driver(&smm665_driver);
}
module_i2c_driver(smm665_driver);
MODULE_AUTHOR("Guenter Roeck");
MODULE_DESCRIPTION("SMM665 driver");
MODULE_LICENSE("GPL");
module_init(smm665_init);
module_exit(smm665_exit);
......@@ -635,19 +635,8 @@ static struct smsc47m192_data *smsc47m192_update_device(struct device *dev)
return data;
}
static int __init smsc47m192_init(void)
{
return i2c_add_driver(&smsc47m192_driver);
}
static void __exit smsc47m192_exit(void)
{
i2c_del_driver(&smsc47m192_driver);
}
module_i2c_driver(smsc47m192_driver);
MODULE_AUTHOR("Hartmut Rick <linux@rick.claranet.de>");
MODULE_DESCRIPTION("SMSC47M192 driver");
MODULE_LICENSE("GPL");
module_init(smsc47m192_init);
module_exit(smsc47m192_exit);
......@@ -465,18 +465,7 @@ static struct thmc50_data *thmc50_update_device(struct device *dev)
return data;
}
static int __init sm_thmc50_init(void)
{
return i2c_add_driver(&thmc50_driver);
}
static void __exit sm_thmc50_exit(void)
{
i2c_del_driver(&thmc50_driver);
}
module_i2c_driver(thmc50_driver);
MODULE_AUTHOR("Krzysztof Helt <krzysztof.h1@wp.pl>");
MODULE_DESCRIPTION("THMC50 driver");
module_init(sm_thmc50_init);
module_exit(sm_thmc50_exit);
......@@ -292,17 +292,7 @@ static struct i2c_driver tmp102_driver = {
.id_table = tmp102_id,
};
static int __init tmp102_init(void)
{
return i2c_add_driver(&tmp102_driver);
}
module_init(tmp102_init);
static void __exit tmp102_exit(void)
{
i2c_del_driver(&tmp102_driver);
}
module_exit(tmp102_exit);
module_i2c_driver(tmp102_driver);
MODULE_AUTHOR("Steven King <sfking@fdwdc.com>");
MODULE_DESCRIPTION("Texas Instruments TMP102 temperature sensor driver");
......
......@@ -662,19 +662,8 @@ static struct i2c_driver tmp401_driver = {
.address_list = normal_i2c,
};
static int __init tmp401_init(void)
{
return i2c_add_driver(&tmp401_driver);
}
static void __exit tmp401_exit(void)
{
i2c_del_driver(&tmp401_driver);
}
module_i2c_driver(tmp401_driver);
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
MODULE_DESCRIPTION("Texas Instruments TMP401 temperature sensor driver");
MODULE_LICENSE("GPL");
module_init(tmp401_init);
module_exit(tmp401_exit);
......@@ -324,20 +324,9 @@ static struct i2c_driver tmp421_driver = {
.address_list = normal_i2c,
};
static int __init tmp421_init(void)
{
return i2c_add_driver(&tmp421_driver);
}
static void __exit tmp421_exit(void)
{
i2c_del_driver(&tmp421_driver);
}
module_i2c_driver(tmp421_driver);
MODULE_AUTHOR("Andre Prendel <andre.prendel@gmx.de>");
MODULE_DESCRIPTION("Texas Instruments TMP421/422/423 temperature sensor"
" driver");
MODULE_LICENSE("GPL");
module_init(tmp421_init);
module_exit(tmp421_exit);
......@@ -1625,19 +1625,8 @@ static void w83791d_print_debug(struct w83791d_data *data, struct device *dev)
}
#endif
static int __init sensors_w83791d_init(void)
{
return i2c_add_driver(&w83791d_driver);
}
static void __exit sensors_w83791d_exit(void)
{
i2c_del_driver(&w83791d_driver);
}
module_i2c_driver(w83791d_driver);
MODULE_AUTHOR("Charles Spirakis <bezaur@gmail.com>");
MODULE_DESCRIPTION("W83791D driver");
MODULE_LICENSE("GPL");
module_init(sensors_w83791d_init);
module_exit(sensors_w83791d_exit);
......@@ -1641,22 +1641,8 @@ static void w83792d_print_debug(struct w83792d_data *data, struct device *dev)
}
#endif
static int __init
sensors_w83792d_init(void)
{
return i2c_add_driver(&w83792d_driver);
}
static void __exit
sensors_w83792d_exit(void)
{
i2c_del_driver(&w83792d_driver);
}
module_i2c_driver(w83792d_driver);
MODULE_AUTHOR("Chunhao Huang @ Winbond <DZShen@Winbond.com.tw>");
MODULE_DESCRIPTION("W83792AD/D driver for linux-2.6");
MODULE_LICENSE("GPL");
module_init(sensors_w83792d_init);
module_exit(sensors_w83792d_exit);
......@@ -2120,19 +2120,8 @@ static int w83793_write_value(struct i2c_client *client, u16 reg, u8 value)
return res;
}
static int __init sensors_w83793_init(void)
{
return i2c_add_driver(&w83793_driver);
}
static void __exit sensors_w83793_exit(void)
{
i2c_del_driver(&w83793_driver);
}
module_i2c_driver(w83793_driver);
MODULE_AUTHOR("Yuan Mu, Sven Anders");
MODULE_DESCRIPTION("w83793 driver");
MODULE_LICENSE("GPL");
module_init(sensors_w83793_init);
module_exit(sensors_w83793_exit);
......@@ -2244,19 +2244,8 @@ static struct i2c_driver w83795_driver = {
.address_list = normal_i2c,
};
static int __init sensors_w83795_init(void)
{
return i2c_add_driver(&w83795_driver);
}
static void __exit sensors_w83795_exit(void)
{
i2c_del_driver(&w83795_driver);
}
module_i2c_driver(w83795_driver);
MODULE_AUTHOR("Wei Song, Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("W83795G/ADG hardware monitoring driver");
MODULE_LICENSE("GPL");
module_init(sensors_w83795_init);
module_exit(sensors_w83795_exit);
......@@ -302,19 +302,8 @@ static struct w83l785ts_data *w83l785ts_update_device(struct device *dev)
return data;
}
static int __init sensors_w83l785ts_init(void)
{
return i2c_add_driver(&w83l785ts_driver);
}
static void __exit sensors_w83l785ts_exit(void)
{
i2c_del_driver(&w83l785ts_driver);
}
module_i2c_driver(w83l785ts_driver);
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
MODULE_DESCRIPTION("W83L785TS-S driver");
MODULE_LICENSE("GPL");
module_init(sensors_w83l785ts_init);
module_exit(sensors_w83l785ts_exit);
......@@ -769,21 +769,8 @@ static struct w83l786ng_data *w83l786ng_update_device(struct device *dev)
return data;
}
static int __init
sensors_w83l786ng_init(void)
{
return i2c_add_driver(&w83l786ng_driver);
}
static void __exit
sensors_w83l786ng_exit(void)
{
i2c_del_driver(&w83l786ng_driver);
}
module_i2c_driver(w83l786ng_driver);
MODULE_AUTHOR("Kevin Lo");
MODULE_DESCRIPTION("w83l786ng driver");
MODULE_LICENSE("GPL");
module_init(sensors_w83l786ng_init);
module_exit(sensors_w83l786ng_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册