diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 14:15:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 14:15:18 -0400 |
commit | 9f9d2760da8c7f94fae119fac3e13d5a1702f8f0 (patch) | |
tree | e244a2969edceff750478e7d98355b76ef30aa0f /drivers/misc | |
parent | ad2a8e6078a16d3b61b530f1447110841c36ae56 (diff) | |
parent | b222258ac11cae3e0350fe5992ad164a7b128103 (diff) |
Merge tag 'char-misc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char and misc patches for 3.4-rc1 from Greg KH:
"Not much here, just a few minor fixes and some conversions to the
module_*_driver() functions, making the codebase smaller."
* tag 'char-misc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
misc: bmp085: Use unsigned long to store jiffies
char/ramoops: included linux/err.h twice
misc: bmp085: Handle jiffies overflow correctly
misc: fsa9480: Remove obsolete cleanup for clientdata
char: Fix typo in tlclk.c
char: Fix typo in viotape.c
cs5535-mfgpt: don't call __init function from __devinit
MISC: convert drivers/misc/* to use module_spi_driver()
MISC: convert drivers/misc/* to use module_i2c_driver()
MISC: convert drivers/misc/* to use module_platform_driver()
Diffstat (limited to 'drivers/misc')
26 files changed, 30 insertions, 306 deletions
diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c index 83adab69bfd..820826270b6 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/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c index 822749e41fe..f62317540d0 100644 --- a/drivers/misc/ad525x_dpot-spi.c +++ b/drivers/misc/ad525x_dpot-spi.c | |||
@@ -135,17 +135,7 @@ static struct spi_driver ad_dpot_spi_driver = { | |||
135 | .id_table = ad_dpot_spi_id, | 135 | .id_table = ad_dpot_spi_id, |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static int __init ad_dpot_spi_init(void) | 138 | module_spi_driver(ad_dpot_spi_driver); |
139 | { | ||
140 | return spi_register_driver(&ad_dpot_spi_driver); | ||
141 | } | ||
142 | module_init(ad_dpot_spi_init); | ||
143 | |||
144 | static void __exit ad_dpot_spi_exit(void) | ||
145 | { | ||
146 | spi_unregister_driver(&ad_dpot_spi_driver); | ||
147 | } | ||
148 | module_exit(ad_dpot_spi_exit); | ||
149 | 139 | ||
150 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 140 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
151 | MODULE_DESCRIPTION("digital potentiometer SPI bus driver"); | 141 | MODULE_DESCRIPTION("digital potentiometer SPI bus driver"); |
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c index 81db7811cf6..0314773f6db 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 e2a52e5cf44..ee74244aa03 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 d79a972f2c7..3d56ae7ef8d 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 bfeea9ba702..54f6f39f990 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 b29a2be2459..76c3064629f 100644 --- a/drivers/misc/bmp085.c +++ b/drivers/misc/bmp085.c | |||
@@ -87,7 +87,7 @@ struct bmp085_data { | |||
87 | u32 raw_temperature; | 87 | u32 raw_temperature; |
88 | u32 raw_pressure; | 88 | u32 raw_pressure; |
89 | unsigned char oversampling_setting; | 89 | unsigned char oversampling_setting; |
90 | u32 last_temp_measurement; | 90 | unsigned long last_temp_measurement; |
91 | s32 b6; /* calculated temperature correction coefficient */ | 91 | s32 b6; /* calculated temperature correction coefficient */ |
92 | }; | 92 | }; |
93 | 93 | ||
@@ -234,7 +234,8 @@ static s32 bmp085_get_pressure(struct bmp085_data *data, int *pressure) | |||
234 | int status; | 234 | int status; |
235 | 235 | ||
236 | /* alt least every second force an update of the ambient temperature */ | 236 | /* alt least every second force an update of the ambient temperature */ |
237 | if (data->last_temp_measurement + 1*HZ < jiffies) { | 237 | if (data->last_temp_measurement == 0 || |
238 | time_is_before_jiffies(data->last_temp_measurement + 1*HZ)) { | ||
238 | status = bmp085_get_temperature(data, NULL); | 239 | status = bmp085_get_temperature(data, NULL); |
239 | if (status != 0) | 240 | if (status != 0) |
240 | goto exit; | 241 | goto exit; |
@@ -464,20 +465,8 @@ static struct i2c_driver bmp085_driver = { | |||
464 | .address_list = normal_i2c | 465 | .address_list = normal_i2c |
465 | }; | 466 | }; |
466 | 467 | ||
467 | static int __init bmp085_init(void) | 468 | 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 | 469 | ||
478 | MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com"); | 470 | MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com"); |
479 | MODULE_DESCRIPTION("BMP085 driver"); | 471 | MODULE_DESCRIPTION("BMP085 driver"); |
480 | MODULE_LICENSE("GPL"); | 472 | MODULE_LICENSE("GPL"); |
481 | |||
482 | module_init(bmp085_init); | ||
483 | module_exit(bmp085_exit); | ||
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 14e974b2a78..366bc156e34 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
@@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = { | |||
1410 | }, | 1410 | }, |
1411 | }; | 1411 | }; |
1412 | 1412 | ||
1413 | /* | 1413 | module_platform_driver(data_of_driver); |
1414 | * Module Init / Exit | ||
1415 | */ | ||
1416 | |||
1417 | static int __init data_init(void) | ||
1418 | { | ||
1419 | return platform_driver_register(&data_of_driver); | ||
1420 | } | ||
1421 | |||
1422 | static void __exit data_exit(void) | ||
1423 | { | ||
1424 | platform_driver_unregister(&data_of_driver); | ||
1425 | } | ||
1426 | 1414 | ||
1427 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); | 1415 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); |
1428 | MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); | 1416 | MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); |
1429 | MODULE_LICENSE("GPL"); | 1417 | MODULE_LICENSE("GPL"); |
1430 | |||
1431 | module_init(data_init); | ||
1432 | module_exit(data_exit); | ||
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c index 87a390de054..f505a40a8f4 100644 --- a/drivers/misc/cs5535-mfgpt.c +++ b/drivers/misc/cs5535-mfgpt.c | |||
@@ -246,7 +246,7 @@ EXPORT_SYMBOL_GPL(cs5535_mfgpt_write); | |||
246 | * Jordan tells me that he and Mitch once played w/ it, but it's unclear | 246 | * Jordan tells me that he and Mitch once played w/ it, but it's unclear |
247 | * what the results of that were (and they experienced some instability). | 247 | * what the results of that were (and they experienced some instability). |
248 | */ | 248 | */ |
249 | static void __init reset_all_timers(void) | 249 | static void __devinit reset_all_timers(void) |
250 | { | 250 | { |
251 | uint32_t val, dummy; | 251 | uint32_t val, dummy; |
252 | 252 | ||
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c index a513f0aa643..154b02e5094 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/at25.c b/drivers/misc/eeprom/at25.c index c627e4174cc..01ab3c9b4cf 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c | |||
@@ -405,17 +405,7 @@ static struct spi_driver at25_driver = { | |||
405 | .remove = __devexit_p(at25_remove), | 405 | .remove = __devexit_p(at25_remove), |
406 | }; | 406 | }; |
407 | 407 | ||
408 | static int __init at25_init(void) | 408 | module_spi_driver(at25_driver); |
409 | { | ||
410 | return spi_register_driver(&at25_driver); | ||
411 | } | ||
412 | module_init(at25_init); | ||
413 | |||
414 | static void __exit at25_exit(void) | ||
415 | { | ||
416 | spi_unregister_driver(&at25_driver); | ||
417 | } | ||
418 | module_exit(at25_exit); | ||
419 | 409 | ||
420 | MODULE_DESCRIPTION("Driver for most SPI EEPROMs"); | 410 | MODULE_DESCRIPTION("Driver for most SPI EEPROMs"); |
421 | MODULE_AUTHOR("David Brownell"); | 411 | MODULE_AUTHOR("David Brownell"); |
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index 45060ddc4e5..c169e07654c 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/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c index 0c7ebb1e19e..ce3fe3633dd 100644 --- a/drivers/misc/eeprom/eeprom_93xx46.c +++ b/drivers/misc/eeprom/eeprom_93xx46.c | |||
@@ -392,17 +392,7 @@ static struct spi_driver eeprom_93xx46_driver = { | |||
392 | .remove = __devexit_p(eeprom_93xx46_remove), | 392 | .remove = __devexit_p(eeprom_93xx46_remove), |
393 | }; | 393 | }; |
394 | 394 | ||
395 | static int __init eeprom_93xx46_init(void) | 395 | module_spi_driver(eeprom_93xx46_driver); |
396 | { | ||
397 | return spi_register_driver(&eeprom_93xx46_driver); | ||
398 | } | ||
399 | module_init(eeprom_93xx46_init); | ||
400 | |||
401 | static void __exit eeprom_93xx46_exit(void) | ||
402 | { | ||
403 | spi_unregister_driver(&eeprom_93xx46_driver); | ||
404 | } | ||
405 | module_exit(eeprom_93xx46_exit); | ||
406 | 396 | ||
407 | MODULE_LICENSE("GPL"); | 397 | MODULE_LICENSE("GPL"); |
408 | MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); | 398 | MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); |
diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c index 5653a3ce051..e36157d5d3a 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 f6586d53e1a..ac96c3a4034 100644 --- a/drivers/misc/fsa9480.c +++ b/drivers/misc/fsa9480.c | |||
@@ -458,7 +458,6 @@ fail2: | |||
458 | if (client->irq) | 458 | if (client->irq) |
459 | free_irq(client->irq, usbsw); | 459 | free_irq(client->irq, usbsw); |
460 | fail1: | 460 | fail1: |
461 | i2c_set_clientdata(client, NULL); | ||
462 | kfree(usbsw); | 461 | kfree(usbsw); |
463 | return ret; | 462 | return ret; |
464 | } | 463 | } |
@@ -468,7 +467,6 @@ static int __devexit fsa9480_remove(struct i2c_client *client) | |||
468 | struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); | 467 | struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); |
469 | if (client->irq) | 468 | if (client->irq) |
470 | free_irq(client->irq, usbsw); | 469 | free_irq(client->irq, usbsw); |
471 | i2c_set_clientdata(client, NULL); | ||
472 | 470 | ||
473 | sysfs_remove_group(&client->dev.kobj, &fsa9480_group); | 471 | sysfs_remove_group(&client->dev.kobj, &fsa9480_group); |
474 | device_init_wakeup(&client->dev, 0); | 472 | device_init_wakeup(&client->dev, 0); |
@@ -541,17 +539,7 @@ static struct i2c_driver fsa9480_i2c_driver = { | |||
541 | .id_table = fsa9480_id, | 539 | .id_table = fsa9480_id, |
542 | }; | 540 | }; |
543 | 541 | ||
544 | static int __init fsa9480_init(void) | 542 | 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 | 543 | ||
556 | MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>"); | 544 | MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>"); |
557 | MODULE_DESCRIPTION("FSA9480 USB Switch driver"); | 545 | MODULE_DESCRIPTION("FSA9480 USB Switch driver"); |
diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c index ca938fc8a8d..423cd40f1c0 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 152e9d93eec..00295367c06 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 a71e245801e..eb5de2e210d 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 3d6cce663be..0aa08c74646 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 c02fea029dc..e8c0019da97 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/lis3lv02d/lis3lv02d_spi.c b/drivers/misc/lis3lv02d/lis3lv02d_spi.c index b2c1be12d16..80880e984b4 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d_spi.c +++ b/drivers/misc/lis3lv02d/lis3lv02d_spi.c | |||
@@ -126,18 +126,7 @@ static struct spi_driver lis302dl_spi_driver = { | |||
126 | .remove = __devexit_p(lis302dl_spi_remove), | 126 | .remove = __devexit_p(lis302dl_spi_remove), |
127 | }; | 127 | }; |
128 | 128 | ||
129 | static int __init lis302dl_init(void) | 129 | module_spi_driver(lis302dl_spi_driver); |
130 | { | ||
131 | return spi_register_driver(&lis302dl_spi_driver); | ||
132 | } | ||
133 | |||
134 | static void __exit lis302dl_exit(void) | ||
135 | { | ||
136 | spi_unregister_driver(&lis302dl_spi_driver); | ||
137 | } | ||
138 | |||
139 | module_init(lis302dl_init); | ||
140 | module_exit(lis302dl_exit); | ||
141 | 130 | ||
142 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 131 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
143 | MODULE_DESCRIPTION("lis3lv02d SPI glue layer"); | 132 | MODULE_DESCRIPTION("lis3lv02d SPI glue layer"); |
diff --git a/drivers/misc/max8997-muic.c b/drivers/misc/max8997-muic.c index d74ef41aabd..19591eaa492 100644 --- a/drivers/misc/max8997-muic.c +++ b/drivers/misc/max8997-muic.c | |||
@@ -488,17 +488,7 @@ static struct platform_driver max8997_muic_driver = { | |||
488 | .remove = __devexit_p(max8997_muic_remove), | 488 | .remove = __devexit_p(max8997_muic_remove), |
489 | }; | 489 | }; |
490 | 490 | ||
491 | static int __init max8997_muic_init(void) | 491 | module_platform_driver(max8997_muic_driver); |
492 | { | ||
493 | return platform_driver_register(&max8997_muic_driver); | ||
494 | } | ||
495 | module_init(max8997_muic_init); | ||
496 | |||
497 | static void __exit max8997_muic_exit(void) | ||
498 | { | ||
499 | platform_driver_unregister(&max8997_muic_driver); | ||
500 | } | ||
501 | module_exit(max8997_muic_exit); | ||
502 | 492 | ||
503 | MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); | 493 | MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); |
504 | MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); | 494 | MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); |
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index 43d073bc1d9..123ed98eec3 100644 --- a/drivers/misc/spear13xx_pcie_gadget.c +++ b/drivers/misc/spear13xx_pcie_gadget.c | |||
@@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = { | |||
891 | }, | 891 | }, |
892 | }; | 892 | }; |
893 | 893 | ||
894 | static int __init spear_pcie_gadget_init(void) | 894 | module_platform_driver(spear_pcie_gadget_driver); |
895 | { | ||
896 | return platform_driver_register(&spear_pcie_gadget_driver); | ||
897 | } | ||
898 | module_init(spear_pcie_gadget_init); | ||
899 | |||
900 | static void __exit spear_pcie_gadget_exit(void) | ||
901 | { | ||
902 | platform_driver_unregister(&spear_pcie_gadget_driver); | ||
903 | } | ||
904 | module_exit(spear_pcie_gadget_exit); | ||
905 | 895 | ||
906 | MODULE_ALIAS("platform:pcie-gadget-spear"); | 896 | MODULE_ALIAS("platform:pcie-gadget-spear"); |
907 | MODULE_AUTHOR("Pratyush Anand"); | 897 | MODULE_AUTHOR("Pratyush Anand"); |
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index a7a861ceee2..7c14f8fd98d 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
@@ -837,19 +837,8 @@ static struct platform_driver kim_platform_driver = { | |||
837 | }, | 837 | }, |
838 | }; | 838 | }; |
839 | 839 | ||
840 | static int __init st_kim_init(void) | 840 | module_platform_driver(kim_platform_driver); |
841 | { | ||
842 | return platform_driver_register(&kim_platform_driver); | ||
843 | } | ||
844 | |||
845 | static void __exit st_kim_deinit(void) | ||
846 | { | ||
847 | platform_driver_unregister(&kim_platform_driver); | ||
848 | } | ||
849 | |||
850 | 841 | ||
851 | module_init(st_kim_init); | ||
852 | module_exit(st_kim_deinit); | ||
853 | MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); | 842 | MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); |
854 | MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); | 843 | MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); |
855 | MODULE_LICENSE("GPL"); | 844 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c index d3f229a3a77..5acbba120de 100644 --- a/drivers/misc/ti_dac7512.c +++ b/drivers/misc/ti_dac7512.c | |||
@@ -82,20 +82,9 @@ static struct spi_driver dac7512_driver = { | |||
82 | .remove = __devexit_p(dac7512_remove), | 82 | .remove = __devexit_p(dac7512_remove), |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static int __init dac7512_init(void) | 85 | module_spi_driver(dac7512_driver); |
86 | { | ||
87 | return spi_register_driver(&dac7512_driver); | ||
88 | } | ||
89 | |||
90 | static void __exit dac7512_exit(void) | ||
91 | { | ||
92 | spi_unregister_driver(&dac7512_driver); | ||
93 | } | ||
94 | 86 | ||
95 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 87 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
96 | MODULE_DESCRIPTION("DAC7512 16-bit DAC"); | 88 | MODULE_DESCRIPTION("DAC7512 16-bit DAC"); |
97 | MODULE_LICENSE("GPL v2"); | 89 | MODULE_LICENSE("GPL v2"); |
98 | MODULE_VERSION(DRIVER_VERSION); | 90 | MODULE_VERSION(DRIVER_VERSION); |
99 | |||
100 | module_init(dac7512_init); | ||
101 | module_exit(dac7512_exit); | ||
diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c index 483ae5f7f68..0beb298a17d 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); | ||