From a3dc3c9eb0a7bcf17604ee444c48b94e2591812d Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 22 Jan 2012 15:38:22 +0800 Subject: 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 Cc: Michael Hennerich Cc: Anatolij Gustschin Cc: Daniel Mack Acked-by: Michael Hennerich Signed-off-by: Greg Kroah-Hartman --- drivers/misc/eeprom/at25.c | 12 +----------- drivers/misc/eeprom/eeprom_93xx46.c | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) (limited to 'drivers/misc/eeprom') 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 = { .remove = __devexit_p(at25_remove), }; -static int __init at25_init(void) -{ - return spi_register_driver(&at25_driver); -} -module_init(at25_init); - -static void __exit at25_exit(void) -{ - spi_unregister_driver(&at25_driver); -} -module_exit(at25_exit); +module_spi_driver(at25_driver); MODULE_DESCRIPTION("Driver for most SPI EEPROMs"); 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 = { .remove = __devexit_p(eeprom_93xx46_remove), }; -static int __init eeprom_93xx46_init(void) -{ - return spi_register_driver(&eeprom_93xx46_driver); -} -module_init(eeprom_93xx46_init); - -static void __exit eeprom_93xx46_exit(void) -{ - spi_unregister_driver(&eeprom_93xx46_driver); -} -module_exit(eeprom_93xx46_exit); +module_spi_driver(eeprom_93xx46_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); -- cgit v1.2.3