aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-22 02:36:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 19:31:49 -0500
commita64fe2ed76614d37abb6966a67f4f39d10efba3c (patch)
tree553806918a13fb98fde71ce8e696d4174e7a103e
parentb00e126ffea89b687a83093546058b07aa054b4c (diff)
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 <axel.lin@gmail.com> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Cc: Anantha Narayanan <Anantha.Narayanan@intel.com> Cc: Hemanth V <hemanthv@ti.com> Cc: Christoph Mair <christoph.mair@gmail.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Ben Gardner <bgardner@wabtec.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Kalhan Trisal <kalhan.trisal@intel.com> Cc: Darrick J. Wong <djwong@us.ibm.com> Cc: Daniel Mack <zonque@gmail.com> Cc: Rodolfo Giometti <giometti@linux.it> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/misc/ad525x_dpot-i2c.c12
-rw-r--r--drivers/misc/apds9802als.c12
-rw-r--r--drivers/misc/apds990x.c13
-rw-r--r--drivers/misc/bh1770glc.c13
-rw-r--r--drivers/misc/bh1780gli.c15
-rw-r--r--drivers/misc/bmp085.c14
-rw-r--r--drivers/misc/ds1682.c13
-rw-r--r--drivers/misc/eeprom/eeprom.c14
-rw-r--r--drivers/misc/eeprom/max6875.c14
-rw-r--r--drivers/misc/fsa9480.c12
-rw-r--r--drivers/misc/hmc6352.c13
-rw-r--r--drivers/misc/ics932s401.c13
-rw-r--r--drivers/misc/isl29003.c14
-rw-r--r--drivers/misc/isl29020.c13
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d_i2c.c13
-rw-r--r--drivers/misc/tsl2550.c13
16 files changed, 17 insertions, 194 deletions
diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c
index 83adab69bfd4..820826270b62 100644
--- a/drivers/misc/ad525x_dpot-i2c.c
+++ b/drivers/misc/ad525x_dpot-i2c.c
@@ -113,17 +113,7 @@ static struct i2c_driver ad_dpot_i2c_driver = {
113 .id_table = ad_dpot_id, 113 .id_table = ad_dpot_id,
114}; 114};
115 115
116static int __init ad_dpot_i2c_init(void) 116module_i2c_driver(ad_dpot_i2c_driver);
117{
118 return i2c_add_driver(&ad_dpot_i2c_driver);
119}
120module_init(ad_dpot_i2c_init);
121
122static void __exit ad_dpot_i2c_exit(void)
123{
124 i2c_del_driver(&ad_dpot_i2c_driver);
125}
126module_exit(ad_dpot_i2c_exit);
127 117
128MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 118MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
129MODULE_DESCRIPTION("digital potentiometer I2C bus driver"); 119MODULE_DESCRIPTION("digital potentiometer I2C bus driver");
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index 81db7811cf68..0314773f6db3 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -332,17 +332,7 @@ static struct i2c_driver apds9802als_driver = {
332 .id_table = apds9802als_id, 332 .id_table = apds9802als_id,
333}; 333};
334 334
335static int __init sensor_apds9802als_init(void) 335module_i2c_driver(apds9802als_driver);
336{
337 return i2c_add_driver(&apds9802als_driver);
338}
339
340static void __exit sensor_apds9802als_exit(void)
341{
342 i2c_del_driver(&apds9802als_driver);
343}
344module_init(sensor_apds9802als_init);
345module_exit(sensor_apds9802als_exit);
346 336
347MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com"); 337MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com");
348MODULE_DESCRIPTION("Avago apds9802als ALS Driver"); 338MODULE_DESCRIPTION("Avago apds9802als ALS Driver");
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index e2a52e5cf449..ee74244aa03b 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -1279,19 +1279,8 @@ static struct i2c_driver apds990x_driver = {
1279 .id_table = apds990x_id, 1279 .id_table = apds990x_id,
1280}; 1280};
1281 1281
1282static int __init apds990x_init(void) 1282module_i2c_driver(apds990x_driver);
1283{
1284 return i2c_add_driver(&apds990x_driver);
1285}
1286
1287static void __exit apds990x_exit(void)
1288{
1289 i2c_del_driver(&apds990x_driver);
1290}
1291 1283
1292MODULE_DESCRIPTION("APDS990X combined ALS and proximity sensor"); 1284MODULE_DESCRIPTION("APDS990X combined ALS and proximity sensor");
1293MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); 1285MODULE_AUTHOR("Samu Onkalo, Nokia Corporation");
1294MODULE_LICENSE("GPL v2"); 1286MODULE_LICENSE("GPL v2");
1295
1296module_init(apds990x_init);
1297module_exit(apds990x_exit);
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index d79a972f2c79..3d56ae7ef8de 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -1399,19 +1399,8 @@ static struct i2c_driver bh1770_driver = {
1399 .id_table = bh1770_id, 1399 .id_table = bh1770_id,
1400}; 1400};
1401 1401
1402static int __init bh1770_init(void) 1402module_i2c_driver(bh1770_driver);
1403{
1404 return i2c_add_driver(&bh1770_driver);
1405}
1406
1407static void __exit bh1770_exit(void)
1408{
1409 i2c_del_driver(&bh1770_driver);
1410}
1411 1403
1412MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor"); 1404MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor");
1413MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); 1405MODULE_AUTHOR("Samu Onkalo, Nokia Corporation");
1414MODULE_LICENSE("GPL v2"); 1406MODULE_LICENSE("GPL v2");
1415
1416module_init(bh1770_init);
1417module_exit(bh1770_exit);
diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c
index bfeea9ba702e..54f6f39f990a 100644
--- a/drivers/misc/bh1780gli.c
+++ b/drivers/misc/bh1780gli.c
@@ -253,21 +253,10 @@ static struct i2c_driver bh1780_driver = {
253 .driver = { 253 .driver = {
254 .name = "bh1780", 254 .name = "bh1780",
255 .pm = BH1780_PMOPS, 255 .pm = BH1780_PMOPS,
256}, 256 },
257}; 257};
258 258
259static int __init bh1780_init(void) 259module_i2c_driver(bh1780_driver);
260{
261 return i2c_add_driver(&bh1780_driver);
262}
263
264static void __exit bh1780_exit(void)
265{
266 i2c_del_driver(&bh1780_driver);
267}
268
269module_init(bh1780_init)
270module_exit(bh1780_exit)
271 260
272MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver"); 261MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver");
273MODULE_LICENSE("GPL"); 262MODULE_LICENSE("GPL");
diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c
index b29a2be24591..3c534aba6272 100644
--- a/drivers/misc/bmp085.c
+++ b/drivers/misc/bmp085.c
@@ -464,20 +464,8 @@ static struct i2c_driver bmp085_driver = {
464 .address_list = normal_i2c 464 .address_list = normal_i2c
465}; 465};
466 466
467static int __init bmp085_init(void) 467module_i2c_driver(bmp085_driver);
468{
469 return i2c_add_driver(&bmp085_driver);
470}
471
472static void __exit bmp085_exit(void)
473{
474 i2c_del_driver(&bmp085_driver);
475}
476
477 468
478MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com"); 469MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com");
479MODULE_DESCRIPTION("BMP085 driver"); 470MODULE_DESCRIPTION("BMP085 driver");
480MODULE_LICENSE("GPL"); 471MODULE_LICENSE("GPL");
481
482module_init(bmp085_init);
483module_exit(bmp085_exit);
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c
index a513f0aa6432..154b02e5094f 100644
--- a/drivers/misc/ds1682.c
+++ b/drivers/misc/ds1682.c
@@ -250,19 +250,8 @@ static struct i2c_driver ds1682_driver = {
250 .id_table = ds1682_id, 250 .id_table = ds1682_id,
251}; 251};
252 252
253static int __init ds1682_init(void) 253module_i2c_driver(ds1682_driver);
254{
255 return i2c_add_driver(&ds1682_driver);
256}
257
258static void __exit ds1682_exit(void)
259{
260 i2c_del_driver(&ds1682_driver);
261}
262 254
263MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); 255MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
264MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver"); 256MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver");
265MODULE_LICENSE("GPL"); 257MODULE_LICENSE("GPL");
266
267module_init(ds1682_init);
268module_exit(ds1682_exit);
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c
index 45060ddc4e59..c169e07654cb 100644
--- a/drivers/misc/eeprom/eeprom.c
+++ b/drivers/misc/eeprom/eeprom.c
@@ -229,22 +229,10 @@ static struct i2c_driver eeprom_driver = {
229 .address_list = normal_i2c, 229 .address_list = normal_i2c,
230}; 230};
231 231
232static int __init eeprom_init(void) 232module_i2c_driver(eeprom_driver);
233{
234 return i2c_add_driver(&eeprom_driver);
235}
236
237static void __exit eeprom_exit(void)
238{
239 i2c_del_driver(&eeprom_driver);
240}
241
242 233
243MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and " 234MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "
244 "Philip Edelbrock <phil@netroedge.com> and " 235 "Philip Edelbrock <phil@netroedge.com> and "
245 "Greg Kroah-Hartman <greg@kroah.com>"); 236 "Greg Kroah-Hartman <greg@kroah.com>");
246MODULE_DESCRIPTION("I2C EEPROM driver"); 237MODULE_DESCRIPTION("I2C EEPROM driver");
247MODULE_LICENSE("GPL"); 238MODULE_LICENSE("GPL");
248
249module_init(eeprom_init);
250module_exit(eeprom_exit);
diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c
index 5653a3ce0517..e36157d5d3ab 100644
--- a/drivers/misc/eeprom/max6875.c
+++ b/drivers/misc/eeprom/max6875.c
@@ -208,20 +208,8 @@ static struct i2c_driver max6875_driver = {
208 .id_table = max6875_id, 208 .id_table = max6875_id,
209}; 209};
210 210
211static int __init max6875_init(void) 211module_i2c_driver(max6875_driver);
212{
213 return i2c_add_driver(&max6875_driver);
214}
215
216static void __exit max6875_exit(void)
217{
218 i2c_del_driver(&max6875_driver);
219}
220
221 212
222MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); 213MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>");
223MODULE_DESCRIPTION("MAX6875 driver"); 214MODULE_DESCRIPTION("MAX6875 driver");
224MODULE_LICENSE("GPL"); 215MODULE_LICENSE("GPL");
225
226module_init(max6875_init);
227module_exit(max6875_exit);
diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c
index f6586d53e1a3..483d6b738095 100644
--- a/drivers/misc/fsa9480.c
+++ b/drivers/misc/fsa9480.c
@@ -541,17 +541,7 @@ static struct i2c_driver fsa9480_i2c_driver = {
541 .id_table = fsa9480_id, 541 .id_table = fsa9480_id,
542}; 542};
543 543
544static int __init fsa9480_init(void) 544module_i2c_driver(fsa9480_i2c_driver);
545{
546 return i2c_add_driver(&fsa9480_i2c_driver);
547}
548module_init(fsa9480_init);
549
550static void __exit fsa9480_exit(void)
551{
552 i2c_del_driver(&fsa9480_i2c_driver);
553}
554module_exit(fsa9480_exit);
555 545
556MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>"); 546MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>");
557MODULE_DESCRIPTION("FSA9480 USB Switch driver"); 547MODULE_DESCRIPTION("FSA9480 USB Switch driver");
diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c
index ca938fc8a8d6..423cd40f1c0f 100644
--- a/drivers/misc/hmc6352.c
+++ b/drivers/misc/hmc6352.c
@@ -148,18 +148,7 @@ static struct i2c_driver hmc6352_driver = {
148 .id_table = hmc6352_id, 148 .id_table = hmc6352_id,
149}; 149};
150 150
151static int __init sensor_hmc6352_init(void) 151module_i2c_driver(hmc6352_driver);
152{
153 return i2c_add_driver(&hmc6352_driver);
154}
155
156static void __exit sensor_hmc6352_exit(void)
157{
158 i2c_del_driver(&hmc6352_driver);
159}
160
161module_init(sensor_hmc6352_init);
162module_exit(sensor_hmc6352_exit);
163 152
164MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com"); 153MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com");
165MODULE_DESCRIPTION("hmc6352 Compass Driver"); 154MODULE_DESCRIPTION("hmc6352 Compass Driver");
diff --git a/drivers/misc/ics932s401.c b/drivers/misc/ics932s401.c
index 152e9d93eecb..00295367c06a 100644
--- a/drivers/misc/ics932s401.c
+++ b/drivers/misc/ics932s401.c
@@ -480,23 +480,12 @@ static int ics932s401_remove(struct i2c_client *client)
480 return 0; 480 return 0;
481} 481}
482 482
483static int __init ics932s401_init(void) 483module_i2c_driver(ics932s401_driver);
484{
485 return i2c_add_driver(&ics932s401_driver);
486}
487
488static void __exit ics932s401_exit(void)
489{
490 i2c_del_driver(&ics932s401_driver);
491}
492 484
493MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>"); 485MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>");
494MODULE_DESCRIPTION("ICS932S401 driver"); 486MODULE_DESCRIPTION("ICS932S401 driver");
495MODULE_LICENSE("GPL"); 487MODULE_LICENSE("GPL");
496 488
497module_init(ics932s401_init);
498module_exit(ics932s401_exit);
499
500/* IBM IntelliStation Z30 */ 489/* IBM IntelliStation Z30 */
501MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*"); 490MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*");
502MODULE_ALIAS("dmi:bvnIBM:*:rn9232:*"); 491MODULE_ALIAS("dmi:bvnIBM:*:rn9232:*");
diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c
index a71e245801ee..eb5de2e210d7 100644
--- a/drivers/misc/isl29003.c
+++ b/drivers/misc/isl29003.c
@@ -455,21 +455,9 @@ static struct i2c_driver isl29003_driver = {
455 .id_table = isl29003_id, 455 .id_table = isl29003_id,
456}; 456};
457 457
458static int __init isl29003_init(void) 458module_i2c_driver(isl29003_driver);
459{
460 return i2c_add_driver(&isl29003_driver);
461}
462
463static void __exit isl29003_exit(void)
464{
465 i2c_del_driver(&isl29003_driver);
466}
467 459
468MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 460MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
469MODULE_DESCRIPTION("ISL29003 ambient light sensor driver"); 461MODULE_DESCRIPTION("ISL29003 ambient light sensor driver");
470MODULE_LICENSE("GPL v2"); 462MODULE_LICENSE("GPL v2");
471MODULE_VERSION(DRIVER_VERSION); 463MODULE_VERSION(DRIVER_VERSION);
472
473module_init(isl29003_init);
474module_exit(isl29003_exit);
475
diff --git a/drivers/misc/isl29020.c b/drivers/misc/isl29020.c
index 3d6cce663bea..0aa08c746463 100644
--- a/drivers/misc/isl29020.c
+++ b/drivers/misc/isl29020.c
@@ -230,18 +230,7 @@ static struct i2c_driver isl29020_driver = {
230 .id_table = isl29020_id, 230 .id_table = isl29020_id,
231}; 231};
232 232
233static int __init sensor_isl29020_init(void) 233module_i2c_driver(isl29020_driver);
234{
235 return i2c_add_driver(&isl29020_driver);
236}
237
238static void __exit sensor_isl29020_exit(void)
239{
240 i2c_del_driver(&isl29020_driver);
241}
242
243module_init(sensor_isl29020_init);
244module_exit(sensor_isl29020_exit);
245 234
246MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com>"); 235MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com>");
247MODULE_DESCRIPTION("Intersil isl29020 ALS Driver"); 236MODULE_DESCRIPTION("Intersil isl29020 ALS Driver");
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index c02fea029dcf..e8c0019da97a 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -256,19 +256,8 @@ static struct i2c_driver lis3lv02d_i2c_driver = {
256 .id_table = lis3lv02d_id, 256 .id_table = lis3lv02d_id,
257}; 257};
258 258
259static int __init lis3lv02d_init(void) 259module_i2c_driver(lis3lv02d_i2c_driver);
260{
261 return i2c_add_driver(&lis3lv02d_i2c_driver);
262}
263
264static void __exit lis3lv02d_exit(void)
265{
266 i2c_del_driver(&lis3lv02d_i2c_driver);
267}
268 260
269MODULE_AUTHOR("Nokia Corporation"); 261MODULE_AUTHOR("Nokia Corporation");
270MODULE_DESCRIPTION("lis3lv02d I2C interface"); 262MODULE_DESCRIPTION("lis3lv02d I2C interface");
271MODULE_LICENSE("GPL"); 263MODULE_LICENSE("GPL");
272
273module_init(lis3lv02d_init);
274module_exit(lis3lv02d_exit);
diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
index 483ae5f7f68e..0beb298a17dd 100644
--- a/drivers/misc/tsl2550.c
+++ b/drivers/misc/tsl2550.c
@@ -454,20 +454,9 @@ static struct i2c_driver tsl2550_driver = {
454 .id_table = tsl2550_id, 454 .id_table = tsl2550_id,
455}; 455};
456 456
457static int __init tsl2550_init(void) 457module_i2c_driver(tsl2550_driver);
458{
459 return i2c_add_driver(&tsl2550_driver);
460}
461
462static void __exit tsl2550_exit(void)
463{
464 i2c_del_driver(&tsl2550_driver);
465}
466 458
467MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); 459MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
468MODULE_DESCRIPTION("TSL2550 ambient light sensor driver"); 460MODULE_DESCRIPTION("TSL2550 ambient light sensor driver");
469MODULE_LICENSE("GPL"); 461MODULE_LICENSE("GPL");
470MODULE_VERSION(DRIVER_VERSION); 462MODULE_VERSION(DRIVER_VERSION);
471
472module_init(tsl2550_init);
473module_exit(tsl2550_exit);