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 | |
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>
-rw-r--r-- | drivers/misc/ad525x_dpot-spi.c | 12 | ||||
-rw-r--r-- | drivers/misc/eeprom/at25.c | 12 | ||||
-rw-r--r-- | drivers/misc/eeprom/eeprom_93xx46.c | 12 | ||||
-rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d_spi.c | 13 | ||||
-rw-r--r-- | drivers/misc/ti_dac7512.c | 13 |
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 | ||
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/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"); |
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 | ||
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/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 | ||
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); | ||