diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-22 02:36:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:31:49 -0500 |
commit | a64fe2ed76614d37abb6966a67f4f39d10efba3c (patch) | |
tree | 553806918a13fb98fde71ce8e696d4174e7a103e | |
parent | b00e126ffea89b687a83093546058b07aa054b4c (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.c | 12 | ||||
-rw-r--r-- | drivers/misc/apds9802als.c | 12 | ||||
-rw-r--r-- | drivers/misc/apds990x.c | 13 | ||||
-rw-r--r-- | drivers/misc/bh1770glc.c | 13 | ||||
-rw-r--r-- | drivers/misc/bh1780gli.c | 15 | ||||
-rw-r--r-- | drivers/misc/bmp085.c | 14 | ||||
-rw-r--r-- | drivers/misc/ds1682.c | 13 | ||||
-rw-r--r-- | drivers/misc/eeprom/eeprom.c | 14 | ||||
-rw-r--r-- | drivers/misc/eeprom/max6875.c | 14 | ||||
-rw-r--r-- | drivers/misc/fsa9480.c | 12 | ||||
-rw-r--r-- | drivers/misc/hmc6352.c | 13 | ||||
-rw-r--r-- | drivers/misc/ics932s401.c | 13 | ||||
-rw-r--r-- | drivers/misc/isl29003.c | 14 | ||||
-rw-r--r-- | drivers/misc/isl29020.c | 13 | ||||
-rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 13 | ||||
-rw-r--r-- | drivers/misc/tsl2550.c | 13 |
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 | ||
116 | static int __init ad_dpot_i2c_init(void) | 116 | module_i2c_driver(ad_dpot_i2c_driver); |
117 | { | ||
118 | return i2c_add_driver(&ad_dpot_i2c_driver); | ||
119 | } | ||
120 | module_init(ad_dpot_i2c_init); | ||
121 | |||
122 | static void __exit ad_dpot_i2c_exit(void) | ||
123 | { | ||
124 | i2c_del_driver(&ad_dpot_i2c_driver); | ||
125 | } | ||
126 | module_exit(ad_dpot_i2c_exit); | ||
127 | 117 | ||
128 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 118 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
129 | MODULE_DESCRIPTION("digital potentiometer I2C bus driver"); | 119 | MODULE_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 | ||
335 | static int __init sensor_apds9802als_init(void) | 335 | module_i2c_driver(apds9802als_driver); |
336 | { | ||
337 | return i2c_add_driver(&apds9802als_driver); | ||
338 | } | ||
339 | |||
340 | static void __exit sensor_apds9802als_exit(void) | ||
341 | { | ||
342 | i2c_del_driver(&apds9802als_driver); | ||
343 | } | ||
344 | module_init(sensor_apds9802als_init); | ||
345 | module_exit(sensor_apds9802als_exit); | ||
346 | 336 | ||
347 | MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com"); | 337 | MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com"); |
348 | MODULE_DESCRIPTION("Avago apds9802als ALS Driver"); | 338 | MODULE_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 | ||
1282 | static int __init apds990x_init(void) | 1282 | module_i2c_driver(apds990x_driver); |
1283 | { | ||
1284 | return i2c_add_driver(&apds990x_driver); | ||
1285 | } | ||
1286 | |||
1287 | static void __exit apds990x_exit(void) | ||
1288 | { | ||
1289 | i2c_del_driver(&apds990x_driver); | ||
1290 | } | ||
1291 | 1283 | ||
1292 | MODULE_DESCRIPTION("APDS990X combined ALS and proximity sensor"); | 1284 | MODULE_DESCRIPTION("APDS990X combined ALS and proximity sensor"); |
1293 | MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); | 1285 | MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); |
1294 | MODULE_LICENSE("GPL v2"); | 1286 | MODULE_LICENSE("GPL v2"); |
1295 | |||
1296 | module_init(apds990x_init); | ||
1297 | module_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 | ||
1402 | static int __init bh1770_init(void) | 1402 | module_i2c_driver(bh1770_driver); |
1403 | { | ||
1404 | return i2c_add_driver(&bh1770_driver); | ||
1405 | } | ||
1406 | |||
1407 | static void __exit bh1770_exit(void) | ||
1408 | { | ||
1409 | i2c_del_driver(&bh1770_driver); | ||
1410 | } | ||
1411 | 1403 | ||
1412 | MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor"); | 1404 | MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor"); |
1413 | MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); | 1405 | MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); |
1414 | MODULE_LICENSE("GPL v2"); | 1406 | MODULE_LICENSE("GPL v2"); |
1415 | |||
1416 | module_init(bh1770_init); | ||
1417 | module_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 | ||
259 | static int __init bh1780_init(void) | 259 | module_i2c_driver(bh1780_driver); |
260 | { | ||
261 | return i2c_add_driver(&bh1780_driver); | ||
262 | } | ||
263 | |||
264 | static void __exit bh1780_exit(void) | ||
265 | { | ||
266 | i2c_del_driver(&bh1780_driver); | ||
267 | } | ||
268 | |||
269 | module_init(bh1780_init) | ||
270 | module_exit(bh1780_exit) | ||
271 | 260 | ||
272 | MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver"); | 261 | MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver"); |
273 | MODULE_LICENSE("GPL"); | 262 | MODULE_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 | ||
467 | static int __init bmp085_init(void) | 467 | module_i2c_driver(bmp085_driver); |
468 | { | ||
469 | return i2c_add_driver(&bmp085_driver); | ||
470 | } | ||
471 | |||
472 | static void __exit bmp085_exit(void) | ||
473 | { | ||
474 | i2c_del_driver(&bmp085_driver); | ||
475 | } | ||
476 | |||
477 | 468 | ||
478 | MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com"); | 469 | MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com"); |
479 | MODULE_DESCRIPTION("BMP085 driver"); | 470 | MODULE_DESCRIPTION("BMP085 driver"); |
480 | MODULE_LICENSE("GPL"); | 471 | MODULE_LICENSE("GPL"); |
481 | |||
482 | module_init(bmp085_init); | ||
483 | module_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 | ||
253 | static int __init ds1682_init(void) | 253 | module_i2c_driver(ds1682_driver); |
254 | { | ||
255 | return i2c_add_driver(&ds1682_driver); | ||
256 | } | ||
257 | |||
258 | static void __exit ds1682_exit(void) | ||
259 | { | ||
260 | i2c_del_driver(&ds1682_driver); | ||
261 | } | ||
262 | 254 | ||
263 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); | 255 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); |
264 | MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver"); | 256 | MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver"); |
265 | MODULE_LICENSE("GPL"); | 257 | MODULE_LICENSE("GPL"); |
266 | |||
267 | module_init(ds1682_init); | ||
268 | module_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 | ||
232 | static int __init eeprom_init(void) | 232 | module_i2c_driver(eeprom_driver); |
233 | { | ||
234 | return i2c_add_driver(&eeprom_driver); | ||
235 | } | ||
236 | |||
237 | static void __exit eeprom_exit(void) | ||
238 | { | ||
239 | i2c_del_driver(&eeprom_driver); | ||
240 | } | ||
241 | |||
242 | 233 | ||
243 | MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and " | 234 | MODULE_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>"); |
246 | MODULE_DESCRIPTION("I2C EEPROM driver"); | 237 | MODULE_DESCRIPTION("I2C EEPROM driver"); |
247 | MODULE_LICENSE("GPL"); | 238 | MODULE_LICENSE("GPL"); |
248 | |||
249 | module_init(eeprom_init); | ||
250 | module_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 | ||
211 | static int __init max6875_init(void) | 211 | module_i2c_driver(max6875_driver); |
212 | { | ||
213 | return i2c_add_driver(&max6875_driver); | ||
214 | } | ||
215 | |||
216 | static void __exit max6875_exit(void) | ||
217 | { | ||
218 | i2c_del_driver(&max6875_driver); | ||
219 | } | ||
220 | |||
221 | 212 | ||
222 | MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); | 213 | MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); |
223 | MODULE_DESCRIPTION("MAX6875 driver"); | 214 | MODULE_DESCRIPTION("MAX6875 driver"); |
224 | MODULE_LICENSE("GPL"); | 215 | MODULE_LICENSE("GPL"); |
225 | |||
226 | module_init(max6875_init); | ||
227 | module_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 | ||
544 | static int __init fsa9480_init(void) | 544 | module_i2c_driver(fsa9480_i2c_driver); |
545 | { | ||
546 | return i2c_add_driver(&fsa9480_i2c_driver); | ||
547 | } | ||
548 | module_init(fsa9480_init); | ||
549 | |||
550 | static void __exit fsa9480_exit(void) | ||
551 | { | ||
552 | i2c_del_driver(&fsa9480_i2c_driver); | ||
553 | } | ||
554 | module_exit(fsa9480_exit); | ||
555 | 545 | ||
556 | MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>"); | 546 | MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>"); |
557 | MODULE_DESCRIPTION("FSA9480 USB Switch driver"); | 547 | MODULE_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 | ||
151 | static int __init sensor_hmc6352_init(void) | 151 | module_i2c_driver(hmc6352_driver); |
152 | { | ||
153 | return i2c_add_driver(&hmc6352_driver); | ||
154 | } | ||
155 | |||
156 | static void __exit sensor_hmc6352_exit(void) | ||
157 | { | ||
158 | i2c_del_driver(&hmc6352_driver); | ||
159 | } | ||
160 | |||
161 | module_init(sensor_hmc6352_init); | ||
162 | module_exit(sensor_hmc6352_exit); | ||
163 | 152 | ||
164 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com"); | 153 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com"); |
165 | MODULE_DESCRIPTION("hmc6352 Compass Driver"); | 154 | MODULE_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 | ||
483 | static int __init ics932s401_init(void) | 483 | module_i2c_driver(ics932s401_driver); |
484 | { | ||
485 | return i2c_add_driver(&ics932s401_driver); | ||
486 | } | ||
487 | |||
488 | static void __exit ics932s401_exit(void) | ||
489 | { | ||
490 | i2c_del_driver(&ics932s401_driver); | ||
491 | } | ||
492 | 484 | ||
493 | MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>"); | 485 | MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>"); |
494 | MODULE_DESCRIPTION("ICS932S401 driver"); | 486 | MODULE_DESCRIPTION("ICS932S401 driver"); |
495 | MODULE_LICENSE("GPL"); | 487 | MODULE_LICENSE("GPL"); |
496 | 488 | ||
497 | module_init(ics932s401_init); | ||
498 | module_exit(ics932s401_exit); | ||
499 | |||
500 | /* IBM IntelliStation Z30 */ | 489 | /* IBM IntelliStation Z30 */ |
501 | MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*"); | 490 | MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*"); |
502 | MODULE_ALIAS("dmi:bvnIBM:*:rn9232:*"); | 491 | MODULE_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 | ||
458 | static int __init isl29003_init(void) | 458 | module_i2c_driver(isl29003_driver); |
459 | { | ||
460 | return i2c_add_driver(&isl29003_driver); | ||
461 | } | ||
462 | |||
463 | static void __exit isl29003_exit(void) | ||
464 | { | ||
465 | i2c_del_driver(&isl29003_driver); | ||
466 | } | ||
467 | 459 | ||
468 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 460 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
469 | MODULE_DESCRIPTION("ISL29003 ambient light sensor driver"); | 461 | MODULE_DESCRIPTION("ISL29003 ambient light sensor driver"); |
470 | MODULE_LICENSE("GPL v2"); | 462 | MODULE_LICENSE("GPL v2"); |
471 | MODULE_VERSION(DRIVER_VERSION); | 463 | MODULE_VERSION(DRIVER_VERSION); |
472 | |||
473 | module_init(isl29003_init); | ||
474 | module_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 | ||
233 | static int __init sensor_isl29020_init(void) | 233 | module_i2c_driver(isl29020_driver); |
234 | { | ||
235 | return i2c_add_driver(&isl29020_driver); | ||
236 | } | ||
237 | |||
238 | static void __exit sensor_isl29020_exit(void) | ||
239 | { | ||
240 | i2c_del_driver(&isl29020_driver); | ||
241 | } | ||
242 | |||
243 | module_init(sensor_isl29020_init); | ||
244 | module_exit(sensor_isl29020_exit); | ||
245 | 234 | ||
246 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com>"); | 235 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com>"); |
247 | MODULE_DESCRIPTION("Intersil isl29020 ALS Driver"); | 236 | MODULE_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 | ||
259 | static int __init lis3lv02d_init(void) | 259 | module_i2c_driver(lis3lv02d_i2c_driver); |
260 | { | ||
261 | return i2c_add_driver(&lis3lv02d_i2c_driver); | ||
262 | } | ||
263 | |||
264 | static void __exit lis3lv02d_exit(void) | ||
265 | { | ||
266 | i2c_del_driver(&lis3lv02d_i2c_driver); | ||
267 | } | ||
268 | 260 | ||
269 | MODULE_AUTHOR("Nokia Corporation"); | 261 | MODULE_AUTHOR("Nokia Corporation"); |
270 | MODULE_DESCRIPTION("lis3lv02d I2C interface"); | 262 | MODULE_DESCRIPTION("lis3lv02d I2C interface"); |
271 | MODULE_LICENSE("GPL"); | 263 | MODULE_LICENSE("GPL"); |
272 | |||
273 | module_init(lis3lv02d_init); | ||
274 | module_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 | ||
457 | static int __init tsl2550_init(void) | 457 | module_i2c_driver(tsl2550_driver); |
458 | { | ||
459 | return i2c_add_driver(&tsl2550_driver); | ||
460 | } | ||
461 | |||
462 | static void __exit tsl2550_exit(void) | ||
463 | { | ||
464 | i2c_del_driver(&tsl2550_driver); | ||
465 | } | ||
466 | 458 | ||
467 | MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); | 459 | MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); |
468 | MODULE_DESCRIPTION("TSL2550 ambient light sensor driver"); | 460 | MODULE_DESCRIPTION("TSL2550 ambient light sensor driver"); |
469 | MODULE_LICENSE("GPL"); | 461 | MODULE_LICENSE("GPL"); |
470 | MODULE_VERSION(DRIVER_VERSION); | 462 | MODULE_VERSION(DRIVER_VERSION); |
471 | |||
472 | module_init(tsl2550_init); | ||
473 | module_exit(tsl2550_exit); | ||