Commit a3dc3c9eb0a7bcf17604ee444c48b94e2591812d
Committed by
Greg Kroah-Hartman
1 parent
a64fe2ed76
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 5 changed files with 5 additions and 57 deletions Side-by-side Diff
drivers/misc/ad525x_dpot-spi.c
... | ... | @@ -135,17 +135,7 @@ |
135 | 135 | .id_table = ad_dpot_spi_id, |
136 | 136 | }; |
137 | 137 | |
138 | -static int __init ad_dpot_spi_init(void) | |
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); | |
138 | +module_spi_driver(ad_dpot_spi_driver); | |
149 | 139 | |
150 | 140 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
151 | 141 | MODULE_DESCRIPTION("digital potentiometer SPI bus driver"); |
drivers/misc/eeprom/at25.c
... | ... | @@ -405,17 +405,7 @@ |
405 | 405 | .remove = __devexit_p(at25_remove), |
406 | 406 | }; |
407 | 407 | |
408 | -static int __init at25_init(void) | |
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); | |
408 | +module_spi_driver(at25_driver); | |
419 | 409 | |
420 | 410 | MODULE_DESCRIPTION("Driver for most SPI EEPROMs"); |
421 | 411 | MODULE_AUTHOR("David Brownell"); |
drivers/misc/eeprom/eeprom_93xx46.c
... | ... | @@ -392,17 +392,7 @@ |
392 | 392 | .remove = __devexit_p(eeprom_93xx46_remove), |
393 | 393 | }; |
394 | 394 | |
395 | -static int __init eeprom_93xx46_init(void) | |
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); | |
395 | +module_spi_driver(eeprom_93xx46_driver); | |
406 | 396 | |
407 | 397 | MODULE_LICENSE("GPL"); |
408 | 398 | MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); |
drivers/misc/lis3lv02d/lis3lv02d_spi.c
... | ... | @@ -126,18 +126,7 @@ |
126 | 126 | .remove = __devexit_p(lis302dl_spi_remove), |
127 | 127 | }; |
128 | 128 | |
129 | -static int __init lis302dl_init(void) | |
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); | |
129 | +module_spi_driver(lis302dl_spi_driver); | |
141 | 130 | |
142 | 131 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
143 | 132 | MODULE_DESCRIPTION("lis3lv02d SPI glue layer"); |
drivers/misc/ti_dac7512.c
... | ... | @@ -82,21 +82,10 @@ |
82 | 82 | .remove = __devexit_p(dac7512_remove), |
83 | 83 | }; |
84 | 84 | |
85 | -static int __init dac7512_init(void) | |
86 | -{ | |
87 | - return spi_register_driver(&dac7512_driver); | |
88 | -} | |
85 | +module_spi_driver(dac7512_driver); | |
89 | 86 | |
90 | -static void __exit dac7512_exit(void) | |
91 | -{ | |
92 | - spi_unregister_driver(&dac7512_driver); | |
93 | -} | |
94 | - | |
95 | 87 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
96 | 88 | MODULE_DESCRIPTION("DAC7512 16-bit DAC"); |
97 | 89 | MODULE_LICENSE("GPL v2"); |
98 | 90 | MODULE_VERSION(DRIVER_VERSION); |
99 | - | |
100 | -module_init(dac7512_init); | |
101 | -module_exit(dac7512_exit); |