aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-22 02:38:22 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 19:31:49 -0500
commita3dc3c9eb0a7bcf17604ee444c48b94e2591812d (patch)
tree8968e8592deceaa60f40b26a316235ce9eb4ed6a
parenta64fe2ed76614d37abb6966a67f4f39d10efba3c (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>
-rw-r--r--drivers/misc/ad525x_dpot-spi.c12
-rw-r--r--drivers/misc/eeprom/at25.c12
-rw-r--r--drivers/misc/eeprom/eeprom_93xx46.c12
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d_spi.c13
-rw-r--r--drivers/misc/ti_dac7512.c13
5 files changed, 5 insertions, 57 deletions
diff --git a/drivers/misc/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c
index 822749e41fea..f62317540d00 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
138static int __init ad_dpot_spi_init(void) 138module_spi_driver(ad_dpot_spi_driver);
139{
140 return spi_register_driver(&ad_dpot_spi_driver);
141}
142module_init(ad_dpot_spi_init);
143
144static void __exit ad_dpot_spi_exit(void)
145{
146 spi_unregister_driver(&ad_dpot_spi_driver);
147}
148module_exit(ad_dpot_spi_exit);
149 139
150MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 140MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
151MODULE_DESCRIPTION("digital potentiometer SPI bus driver"); 141MODULE_DESCRIPTION("digital potentiometer SPI bus driver");
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
408static int __init at25_init(void) 408module_spi_driver(at25_driver);
409{
410 return spi_register_driver(&at25_driver);
411}
412module_init(at25_init);
413
414static void __exit at25_exit(void)
415{
416 spi_unregister_driver(&at25_driver);
417}
418module_exit(at25_exit);
419 409
420MODULE_DESCRIPTION("Driver for most SPI EEPROMs"); 410MODULE_DESCRIPTION("Driver for most SPI EEPROMs");
421MODULE_AUTHOR("David Brownell"); 411MODULE_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
395static int __init eeprom_93xx46_init(void) 395module_spi_driver(eeprom_93xx46_driver);
396{
397 return spi_register_driver(&eeprom_93xx46_driver);
398}
399module_init(eeprom_93xx46_init);
400
401static void __exit eeprom_93xx46_exit(void)
402{
403 spi_unregister_driver(&eeprom_93xx46_driver);
404}
405module_exit(eeprom_93xx46_exit);
406 396
407MODULE_LICENSE("GPL"); 397MODULE_LICENSE("GPL");
408MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); 398MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs");
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_spi.c b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
index b2c1be12d16f..80880e984b4f 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
129static int __init lis302dl_init(void) 129module_spi_driver(lis302dl_spi_driver);
130{
131 return spi_register_driver(&lis302dl_spi_driver);
132}
133
134static void __exit lis302dl_exit(void)
135{
136 spi_unregister_driver(&lis302dl_spi_driver);
137}
138
139module_init(lis302dl_init);
140module_exit(lis302dl_exit);
141 130
142MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 131MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
143MODULE_DESCRIPTION("lis3lv02d SPI glue layer"); 132MODULE_DESCRIPTION("lis3lv02d SPI glue layer");
diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c
index d3f229a3a77e..5acbba120de0 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
85static int __init dac7512_init(void) 85module_spi_driver(dac7512_driver);
86{
87 return spi_register_driver(&dac7512_driver);
88}
89
90static void __exit dac7512_exit(void)
91{
92 spi_unregister_driver(&dac7512_driver);
93}
94 86
95MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 87MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
96MODULE_DESCRIPTION("DAC7512 16-bit DAC"); 88MODULE_DESCRIPTION("DAC7512 16-bit DAC");
97MODULE_LICENSE("GPL v2"); 89MODULE_LICENSE("GPL v2");
98MODULE_VERSION(DRIVER_VERSION); 90MODULE_VERSION(DRIVER_VERSION);
99
100module_init(dac7512_init);
101module_exit(dac7512_exit);