diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-22 02:38:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:31:49 -0500 |
commit | a3dc3c9eb0a7bcf17604ee444c48b94e2591812d (patch) | |
tree | 8968e8592deceaa60f40b26a316235ce9eb4ed6a /drivers/misc/eeprom | |
parent | a64fe2ed76614d37abb6966a67f4f39d10efba3c (diff) |
MISC: convert drivers/misc/* to use module_spi_driver()
This patch converts the drivers in drivers/misc/* to use the
module_spi_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: Anatolij Gustschin <agust@denx.de>
Cc: Daniel Mack <zonque@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r-- | drivers/misc/eeprom/at25.c | 12 | ||||
-rw-r--r-- | drivers/misc/eeprom/eeprom_93xx46.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index c627e4174ccd..01ab3c9b4cf7 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_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c index 0c7ebb1e19e5..ce3fe3633dd7 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"); |