diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-02 21:09:19 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-01 06:00:21 -0400 |
commit | 38a36f5a6ab893fac87ffd1b1c92a491dfd71ea1 (patch) | |
tree | 07d49ac96d24c689ff4e44583130301e72c8ff8a | |
parent | 6ed9f9c405f97cb7cda485f589cfa6c2bb3fb78e (diff) |
mfd: Use module_pci_driver
This patch converts the drivers in drivers/mfd/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Andres Salomon <dilinger@queued.net>
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Denis Turischev <denis@compulab.co.il>
Cc: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/cs5535-mfd.c | 13 | ||||
-rw-r--r-- | drivers/mfd/janz-cmodio.c | 17 | ||||
-rw-r--r-- | drivers/mfd/lpc_sch.c | 13 | ||||
-rw-r--r-- | drivers/mfd/rdc321x-southbridge.c | 13 | ||||
-rw-r--r-- | drivers/mfd/vx855.c | 12 |
5 files changed, 5 insertions, 63 deletions
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c index 315fef5d466a..3419e726de47 100644 --- a/drivers/mfd/cs5535-mfd.c +++ b/drivers/mfd/cs5535-mfd.c | |||
@@ -186,18 +186,7 @@ static struct pci_driver cs5535_mfd_driver = { | |||
186 | .remove = __devexit_p(cs5535_mfd_remove), | 186 | .remove = __devexit_p(cs5535_mfd_remove), |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static int __init cs5535_mfd_init(void) | 189 | module_pci_driver(cs5535_mfd_driver); |
190 | { | ||
191 | return pci_register_driver(&cs5535_mfd_driver); | ||
192 | } | ||
193 | |||
194 | static void __exit cs5535_mfd_exit(void) | ||
195 | { | ||
196 | pci_unregister_driver(&cs5535_mfd_driver); | ||
197 | } | ||
198 | |||
199 | module_init(cs5535_mfd_init); | ||
200 | module_exit(cs5535_mfd_exit); | ||
201 | 190 | ||
202 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); | 191 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
203 | MODULE_DESCRIPTION("MFD driver for CS5535/CS5536 southbridge's ISA PCI device"); | 192 | MODULE_DESCRIPTION("MFD driver for CS5535/CS5536 southbridge's ISA PCI device"); |
diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c index a9223ed1b7c5..2ea99989551a 100644 --- a/drivers/mfd/janz-cmodio.c +++ b/drivers/mfd/janz-cmodio.c | |||
@@ -283,23 +283,8 @@ static struct pci_driver cmodio_pci_driver = { | |||
283 | .remove = __devexit_p(cmodio_pci_remove), | 283 | .remove = __devexit_p(cmodio_pci_remove), |
284 | }; | 284 | }; |
285 | 285 | ||
286 | /* | 286 | module_pci_driver(cmodio_pci_driver); |
287 | * Module Init / Exit | ||
288 | */ | ||
289 | |||
290 | static int __init cmodio_init(void) | ||
291 | { | ||
292 | return pci_register_driver(&cmodio_pci_driver); | ||
293 | } | ||
294 | |||
295 | static void __exit cmodio_exit(void) | ||
296 | { | ||
297 | pci_unregister_driver(&cmodio_pci_driver); | ||
298 | } | ||
299 | 287 | ||
300 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); | 288 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); |
301 | MODULE_DESCRIPTION("Janz CMOD-IO PCI MODULbus Carrier Board Driver"); | 289 | MODULE_DESCRIPTION("Janz CMOD-IO PCI MODULbus Carrier Board Driver"); |
302 | MODULE_LICENSE("GPL"); | 290 | MODULE_LICENSE("GPL"); |
303 | |||
304 | module_init(cmodio_init); | ||
305 | module_exit(cmodio_exit); | ||
diff --git a/drivers/mfd/lpc_sch.c b/drivers/mfd/lpc_sch.c index abc421364a45..27026eb924cd 100644 --- a/drivers/mfd/lpc_sch.c +++ b/drivers/mfd/lpc_sch.c | |||
@@ -167,18 +167,7 @@ static struct pci_driver lpc_sch_driver = { | |||
167 | .remove = __devexit_p(lpc_sch_remove), | 167 | .remove = __devexit_p(lpc_sch_remove), |
168 | }; | 168 | }; |
169 | 169 | ||
170 | static int __init lpc_sch_init(void) | 170 | module_pci_driver(lpc_sch_driver); |
171 | { | ||
172 | return pci_register_driver(&lpc_sch_driver); | ||
173 | } | ||
174 | |||
175 | static void __exit lpc_sch_exit(void) | ||
176 | { | ||
177 | pci_unregister_driver(&lpc_sch_driver); | ||
178 | } | ||
179 | |||
180 | module_init(lpc_sch_init); | ||
181 | module_exit(lpc_sch_exit); | ||
182 | 171 | ||
183 | MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>"); | 172 | MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>"); |
184 | MODULE_DESCRIPTION("LPC interface for Intel Poulsbo SCH"); | 173 | MODULE_DESCRIPTION("LPC interface for Intel Poulsbo SCH"); |
diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c index 809bd4a61089..685d61e431ad 100644 --- a/drivers/mfd/rdc321x-southbridge.c +++ b/drivers/mfd/rdc321x-southbridge.c | |||
@@ -108,18 +108,7 @@ static struct pci_driver rdc321x_sb_driver = { | |||
108 | .remove = __devexit_p(rdc321x_sb_remove), | 108 | .remove = __devexit_p(rdc321x_sb_remove), |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static int __init rdc321x_sb_init(void) | 111 | module_pci_driver(rdc321x_sb_driver); |
112 | { | ||
113 | return pci_register_driver(&rdc321x_sb_driver); | ||
114 | } | ||
115 | |||
116 | static void __exit rdc321x_sb_exit(void) | ||
117 | { | ||
118 | pci_unregister_driver(&rdc321x_sb_driver); | ||
119 | } | ||
120 | |||
121 | module_init(rdc321x_sb_init); | ||
122 | module_exit(rdc321x_sb_exit); | ||
123 | 112 | ||
124 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); | 113 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); |
125 | MODULE_LICENSE("GPL"); | 114 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/mfd/vx855.c b/drivers/mfd/vx855.c index b73cc15e0081..872aff21e4be 100644 --- a/drivers/mfd/vx855.c +++ b/drivers/mfd/vx855.c | |||
@@ -131,17 +131,7 @@ static struct pci_driver vx855_pci_driver = { | |||
131 | .remove = __devexit_p(vx855_remove), | 131 | .remove = __devexit_p(vx855_remove), |
132 | }; | 132 | }; |
133 | 133 | ||
134 | static int vx855_init(void) | 134 | module_pci_driver(vx855_pci_driver); |
135 | { | ||
136 | return pci_register_driver(&vx855_pci_driver); | ||
137 | } | ||
138 | module_init(vx855_init); | ||
139 | |||
140 | static void vx855_exit(void) | ||
141 | { | ||
142 | pci_unregister_driver(&vx855_pci_driver); | ||
143 | } | ||
144 | module_exit(vx855_exit); | ||
145 | 135 | ||
146 | MODULE_LICENSE("GPL"); | 136 | MODULE_LICENSE("GPL"); |
147 | MODULE_AUTHOR("Harald Welte <HaraldWelte@viatech.com>"); | 137 | MODULE_AUTHOR("Harald Welte <HaraldWelte@viatech.com>"); |