diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:13:02 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:10:40 -0400 |
commit | 4018294b53d1dae026880e45f174c1cc63b5d435 (patch) | |
tree | 6db3538eaf91b653381720a6d92f4f15634a93d0 /arch | |
parent | 597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (diff) |
of: Remove duplicate fields from of_platform_driver
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver. This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.
This patch is a pretty mechanical change. The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial. This patch looks big and scary because it touches so
many files, but it should be pretty safe.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Diffstat (limited to 'arch')
30 files changed, 146 insertions, 85 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 355257bb149d..21266abfbda6 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -201,9 +201,6 @@ static int ibmebus_create_devices(const struct of_device_id *matches) | |||
201 | 201 | ||
202 | int ibmebus_register_driver(struct of_platform_driver *drv) | 202 | int ibmebus_register_driver(struct of_platform_driver *drv) |
203 | { | 203 | { |
204 | if (!drv->driver.of_match_table) | ||
205 | drv->driver.of_match_table = drv->match_table; | ||
206 | |||
207 | /* If the driver uses devices that ibmebus doesn't know, add them */ | 204 | /* If the driver uses devices that ibmebus doesn't know, add them */ |
208 | ibmebus_create_devices(drv->driver.of_match_table); | 205 | ibmebus_create_devices(drv->driver.of_match_table); |
209 | 206 | ||
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 218853466510..487a98851ba6 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -306,10 +306,11 @@ static struct of_device_id of_pci_phb_ids[] = { | |||
306 | }; | 306 | }; |
307 | 307 | ||
308 | static struct of_platform_driver of_pci_phb_driver = { | 308 | static struct of_platform_driver of_pci_phb_driver = { |
309 | .match_table = of_pci_phb_ids, | ||
310 | .probe = of_pci_phb_probe, | 309 | .probe = of_pci_phb_probe, |
311 | .driver = { | 310 | .driver = { |
312 | .name = "of-pci", | 311 | .name = "of-pci", |
312 | .owner = THIS_MODULE, | ||
313 | .of_match_table = of_pci_phb_ids, | ||
313 | }, | 314 | }, |
314 | }; | 315 | }; |
315 | 316 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index 576669fc4fbf..ca5305a5bd61 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -193,8 +193,11 @@ static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = { | |||
193 | }; | 193 | }; |
194 | 194 | ||
195 | static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = { | 195 | static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = { |
196 | .name = "gpio_wkup", | 196 | .driver = { |
197 | .match_table = mpc52xx_wkup_gpiochip_match, | 197 | .name = "gpio_wkup", |
198 | .owner = THIS_MODULE, | ||
199 | .of_match_table = mpc52xx_wkup_gpiochip_match, | ||
200 | }, | ||
198 | .probe = mpc52xx_wkup_gpiochip_probe, | 201 | .probe = mpc52xx_wkup_gpiochip_probe, |
199 | .remove = mpc52xx_gpiochip_remove, | 202 | .remove = mpc52xx_gpiochip_remove, |
200 | }; | 203 | }; |
@@ -349,8 +352,11 @@ static const struct of_device_id mpc52xx_simple_gpiochip_match[] = { | |||
349 | }; | 352 | }; |
350 | 353 | ||
351 | static struct of_platform_driver mpc52xx_simple_gpiochip_driver = { | 354 | static struct of_platform_driver mpc52xx_simple_gpiochip_driver = { |
352 | .name = "gpio", | 355 | .driver = { |
353 | .match_table = mpc52xx_simple_gpiochip_match, | 356 | .name = "gpio", |
357 | .owner = THIS_MODULE, | ||
358 | .of_match_table = mpc52xx_simple_gpiochip_match, | ||
359 | }, | ||
354 | .probe = mpc52xx_simple_gpiochip_probe, | 360 | .probe = mpc52xx_simple_gpiochip_probe, |
355 | .remove = mpc52xx_gpiochip_remove, | 361 | .remove = mpc52xx_gpiochip_remove, |
356 | }; | 362 | }; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index 42c507f9c35b..46c93578cbf0 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -784,8 +784,11 @@ static const struct of_device_id mpc52xx_gpt_match[] = { | |||
784 | }; | 784 | }; |
785 | 785 | ||
786 | static struct of_platform_driver mpc52xx_gpt_driver = { | 786 | static struct of_platform_driver mpc52xx_gpt_driver = { |
787 | .name = "mpc52xx-gpt", | 787 | .driver = { |
788 | .match_table = mpc52xx_gpt_match, | 788 | .name = "mpc52xx-gpt", |
789 | .owner = THIS_MODULE, | ||
790 | .of_match_table = mpc52xx_gpt_match, | ||
791 | }, | ||
789 | .probe = mpc52xx_gpt_probe, | 792 | .probe = mpc52xx_gpt_probe, |
790 | .remove = mpc52xx_gpt_remove, | 793 | .remove = mpc52xx_gpt_remove, |
791 | }; | 794 | }; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 17b99ba7a8cc..e86aec644501 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -537,9 +537,11 @@ static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = { | |||
537 | }; | 537 | }; |
538 | 538 | ||
539 | static struct of_platform_driver mpc52xx_lpbfifo_driver = { | 539 | static struct of_platform_driver mpc52xx_lpbfifo_driver = { |
540 | .owner = THIS_MODULE, | 540 | .driver = { |
541 | .name = "mpc52xx-lpbfifo", | 541 | .name = "mpc52xx-lpbfifo", |
542 | .match_table = mpc52xx_lpbfifo_match, | 542 | .owner = THIS_MODULE, |
543 | .of_match_table = mpc52xx_lpbfifo_match, | ||
544 | }, | ||
543 | .probe = mpc52xx_lpbfifo_probe, | 545 | .probe = mpc52xx_lpbfifo_probe, |
544 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), | 546 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), |
545 | }; | 547 | }; |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 0176ae8249d5..9f2e52b36f91 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -170,8 +170,9 @@ static const struct of_device_id ep8248e_mdio_match[] = { | |||
170 | static struct of_platform_driver ep8248e_mdio_driver = { | 170 | static struct of_platform_driver ep8248e_mdio_driver = { |
171 | .driver = { | 171 | .driver = { |
172 | .name = "ep8248e-mdio-bitbang", | 172 | .name = "ep8248e-mdio-bitbang", |
173 | .owner = THIS_MODULE, | ||
174 | .of_match_table = ep8248e_mdio_match, | ||
173 | }, | 175 | }, |
174 | .match_table = ep8248e_mdio_match, | ||
175 | .probe = ep8248e_mdio_probe, | 176 | .probe = ep8248e_mdio_probe, |
176 | .remove = ep8248e_mdio_remove, | 177 | .remove = ep8248e_mdio_remove, |
177 | }; | 178 | }; |
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c index aa0b764b1cc4..ebe6c3537209 100644 --- a/arch/powerpc/platforms/83xx/suspend.c +++ b/arch/powerpc/platforms/83xx/suspend.c | |||
@@ -423,8 +423,11 @@ static struct of_device_id pmc_match[] = { | |||
423 | }; | 423 | }; |
424 | 424 | ||
425 | static struct of_platform_driver pmc_driver = { | 425 | static struct of_platform_driver pmc_driver = { |
426 | .name = "mpc83xx-pmc", | 426 | .driver = { |
427 | .match_table = pmc_match, | 427 | .name = "mpc83xx-pmc", |
428 | .owner = THIS_MODULE, | ||
429 | .of_match_table = pmc_match, | ||
430 | }, | ||
428 | .probe = pmc_probe, | 431 | .probe = pmc_probe, |
429 | .remove = pmc_remove | 432 | .remove = pmc_remove |
430 | }; | 433 | }; |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 177a4f1369b4..6257e5378615 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -447,11 +447,12 @@ static const struct of_device_id axon_msi_device_id[] = { | |||
447 | }; | 447 | }; |
448 | 448 | ||
449 | static struct of_platform_driver axon_msi_driver = { | 449 | static struct of_platform_driver axon_msi_driver = { |
450 | .match_table = axon_msi_device_id, | ||
451 | .probe = axon_msi_probe, | 450 | .probe = axon_msi_probe, |
452 | .shutdown = axon_msi_shutdown, | 451 | .shutdown = axon_msi_shutdown, |
453 | .driver = { | 452 | .driver = { |
454 | .name = "axon-msi" | 453 | .name = "axon-msi", |
454 | .owner = THIS_MODULE, | ||
455 | .of_match_table = axon_msi_device_id, | ||
455 | }, | 456 | }, |
456 | }; | 457 | }; |
457 | 458 | ||
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index c44e1b3b91db..627ee089e75d 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -301,11 +301,12 @@ MODULE_DEVICE_TABLE(of, gpio_mdio_match); | |||
301 | 301 | ||
302 | static struct of_platform_driver gpio_mdio_driver = | 302 | static struct of_platform_driver gpio_mdio_driver = |
303 | { | 303 | { |
304 | .match_table = gpio_mdio_match, | ||
305 | .probe = gpio_mdio_probe, | 304 | .probe = gpio_mdio_probe, |
306 | .remove = gpio_mdio_remove, | 305 | .remove = gpio_mdio_remove, |
307 | .driver = { | 306 | .driver = { |
308 | .name = "gpio-mdio-bitbang", | 307 | .name = "gpio-mdio-bitbang", |
308 | .owner = THIS_MODULE, | ||
309 | .of_match_table = gpio_mdio_match, | ||
309 | }, | 310 | }, |
310 | }; | 311 | }; |
311 | 312 | ||
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 88b21fccf0c9..402d2212162f 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -327,12 +327,12 @@ static struct of_device_id axon_ram_device_id[] = { | |||
327 | }; | 327 | }; |
328 | 328 | ||
329 | static struct of_platform_driver axon_ram_driver = { | 329 | static struct of_platform_driver axon_ram_driver = { |
330 | .match_table = axon_ram_device_id, | ||
331 | .probe = axon_ram_probe, | 330 | .probe = axon_ram_probe, |
332 | .remove = axon_ram_remove, | 331 | .remove = axon_ram_remove, |
333 | .driver = { | 332 | .driver = { |
334 | .owner = THIS_MODULE, | 333 | .name = AXON_RAM_MODULE_NAME, |
335 | .name = AXON_RAM_MODULE_NAME, | 334 | .owner = THIS_MODULE, |
335 | .of_match_table = axon_ram_device_id, | ||
336 | }, | 336 | }, |
337 | }; | 337 | }; |
338 | 338 | ||
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index d32d5389b67a..a7c5c470af14 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
@@ -494,14 +494,12 @@ MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match); | |||
494 | 494 | ||
495 | 495 | ||
496 | static struct of_platform_driver mpc52xx_bcom_of_platform_driver = { | 496 | static struct of_platform_driver mpc52xx_bcom_of_platform_driver = { |
497 | .owner = THIS_MODULE, | ||
498 | .name = DRIVER_NAME, | ||
499 | .match_table = mpc52xx_bcom_of_match, | ||
500 | .probe = mpc52xx_bcom_probe, | 497 | .probe = mpc52xx_bcom_probe, |
501 | .remove = mpc52xx_bcom_remove, | 498 | .remove = mpc52xx_bcom_remove, |
502 | .driver = { | 499 | .driver = { |
503 | .name = DRIVER_NAME, | 500 | .name = DRIVER_NAME, |
504 | .owner = THIS_MODULE, | 501 | .owner = THIS_MODULE, |
502 | .of_match_table = mpc52xx_bcom_of_match, | ||
505 | }, | 503 | }, |
506 | }; | 504 | }; |
507 | 505 | ||
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 569dae8ea1ce..a7be144f5874 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -345,8 +345,11 @@ static const struct of_device_id fsl_of_msi_ids[] = { | |||
345 | }; | 345 | }; |
346 | 346 | ||
347 | static struct of_platform_driver fsl_of_msi_driver = { | 347 | static struct of_platform_driver fsl_of_msi_driver = { |
348 | .name = "fsl-msi", | 348 | .driver = { |
349 | .match_table = fsl_of_msi_ids, | 349 | .name = "fsl-msi", |
350 | .owner = THIS_MODULE, | ||
351 | .of_match_table = fsl_of_msi_ids, | ||
352 | }, | ||
350 | .probe = fsl_of_msi_probe, | 353 | .probe = fsl_of_msi_probe, |
351 | }; | 354 | }; |
352 | 355 | ||
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c index 2ebe817ca72f..9082eb921ad9 100644 --- a/arch/powerpc/sysdev/fsl_pmc.c +++ b/arch/powerpc/sysdev/fsl_pmc.c | |||
@@ -76,8 +76,11 @@ static const struct of_device_id pmc_ids[] = { | |||
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct of_platform_driver pmc_driver = { | 78 | static struct of_platform_driver pmc_driver = { |
79 | .driver.name = "fsl-pmc", | 79 | .driver = { |
80 | .match_table = pmc_ids, | 80 | .name = "fsl-pmc", |
81 | .owner = THIS_MODULE, | ||
82 | .of_match_table = pmc_ids, | ||
83 | }, | ||
81 | .probe = pmc_probe, | 84 | .probe = pmc_probe, |
82 | }; | 85 | }; |
83 | 86 | ||
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index a98d51639243..6a1fde0d22b0 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1215,8 +1215,11 @@ static const struct of_device_id fsl_of_rio_rpn_ids[] = { | |||
1215 | }; | 1215 | }; |
1216 | 1216 | ||
1217 | static struct of_platform_driver fsl_of_rio_rpn_driver = { | 1217 | static struct of_platform_driver fsl_of_rio_rpn_driver = { |
1218 | .name = "fsl-of-rio", | 1218 | .driver = { |
1219 | .match_table = fsl_of_rio_rpn_ids, | 1219 | .name = "fsl-of-rio", |
1220 | .owner = THIS_MODULE, | ||
1221 | .of_match_table = fsl_of_rio_rpn_ids, | ||
1222 | }, | ||
1220 | .probe = fsl_of_rio_rpn_probe, | 1223 | .probe = fsl_of_rio_rpn_probe, |
1221 | }; | 1224 | }; |
1222 | 1225 | ||
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c index ff758bff1b7a..d07137a07d75 100644 --- a/arch/powerpc/sysdev/pmi.c +++ b/arch/powerpc/sysdev/pmi.c | |||
@@ -206,11 +206,12 @@ static int pmi_of_remove(struct of_device *dev) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | static struct of_platform_driver pmi_of_platform_driver = { | 208 | static struct of_platform_driver pmi_of_platform_driver = { |
209 | .match_table = pmi_match, | ||
210 | .probe = pmi_of_probe, | 209 | .probe = pmi_of_probe, |
211 | .remove = pmi_of_remove, | 210 | .remove = pmi_of_remove, |
212 | .driver = { | 211 | .driver = { |
213 | .name = "pmi", | 212 | .name = "pmi", |
213 | .owner = THIS_MODULE, | ||
214 | .of_match_table = pmi_match, | ||
214 | }, | 215 | }, |
215 | }; | 216 | }; |
216 | 217 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 149393c02c3f..093e0ae1a941 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -669,8 +669,11 @@ static const struct of_device_id qe_ids[] = { | |||
669 | }; | 669 | }; |
670 | 670 | ||
671 | static struct of_platform_driver qe_driver = { | 671 | static struct of_platform_driver qe_driver = { |
672 | .driver.name = "fsl-qe", | 672 | .driver = { |
673 | .match_table = qe_ids, | 673 | .name = "fsl-qe", |
674 | .owner = THIS_MODULE, | ||
675 | .of_match_table = qe_ids, | ||
676 | }, | ||
674 | .probe = qe_probe, | 677 | .probe = qe_probe, |
675 | .resume = qe_resume, | 678 | .resume = qe_resume, |
676 | }; | 679 | }; |
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 1bb6a41b00f2..c333b8d0949b 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -232,8 +232,11 @@ static const struct of_device_id ecpp_match[] = { | |||
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct of_platform_driver ecpp_driver = { | 234 | static struct of_platform_driver ecpp_driver = { |
235 | .name = "ecpp", | 235 | .driver = { |
236 | .match_table = ecpp_match, | 236 | .name = "ecpp", |
237 | .owner = THIS_MODULE, | ||
238 | .of_match_table = ecpp_match, | ||
239 | }, | ||
237 | .probe = ecpp_probe, | 240 | .probe = ecpp_probe, |
238 | .remove = __devexit_p(ecpp_remove), | 241 | .remove = __devexit_p(ecpp_remove), |
239 | }; | 242 | }; |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 71ec90b9e316..b27476caa133 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
@@ -174,8 +174,11 @@ static struct of_device_id __initdata apc_match[] = { | |||
174 | MODULE_DEVICE_TABLE(of, apc_match); | 174 | MODULE_DEVICE_TABLE(of, apc_match); |
175 | 175 | ||
176 | static struct of_platform_driver apc_driver = { | 176 | static struct of_platform_driver apc_driver = { |
177 | .name = "apc", | 177 | .driver = { |
178 | .match_table = apc_match, | 178 | .name = "apc", |
179 | .owner = THIS_MODULE, | ||
180 | .of_match_table = apc_match, | ||
181 | }, | ||
179 | .probe = apc_probe, | 182 | .probe = apc_probe, |
180 | }; | 183 | }; |
181 | 184 | ||
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index bd8421a26856..ddc84128b3c2 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -132,10 +132,11 @@ static int __devinit auxio_probe(struct of_device *dev, const struct of_device_i | |||
132 | } | 132 | } |
133 | 133 | ||
134 | static struct of_platform_driver auxio_driver = { | 134 | static struct of_platform_driver auxio_driver = { |
135 | .match_table = auxio_match, | ||
136 | .probe = auxio_probe, | 135 | .probe = auxio_probe, |
137 | .driver = { | 136 | .driver = { |
138 | .name = "auxio", | 137 | .name = "auxio", |
138 | .owner = THIS_MODULE, | ||
139 | .of_match_table = auxio_match, | ||
139 | }, | 140 | }, |
140 | }; | 141 | }; |
141 | 142 | ||
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index d533f3d5d484..434335f65823 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -149,10 +149,11 @@ static struct of_device_id __initdata clock_board_match[] = { | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | static struct of_platform_driver clock_board_driver = { | 151 | static struct of_platform_driver clock_board_driver = { |
152 | .match_table = clock_board_match, | ||
153 | .probe = clock_board_probe, | 152 | .probe = clock_board_probe, |
154 | .driver = { | 153 | .driver = { |
155 | .name = "clock_board", | 154 | .name = "clock_board", |
155 | .owner = THIS_MODULE, | ||
156 | .of_match_table = clock_board_match, | ||
156 | }, | 157 | }, |
157 | }; | 158 | }; |
158 | 159 | ||
@@ -254,10 +255,11 @@ static struct of_device_id __initdata fhc_match[] = { | |||
254 | }; | 255 | }; |
255 | 256 | ||
256 | static struct of_platform_driver fhc_driver = { | 257 | static struct of_platform_driver fhc_driver = { |
257 | .match_table = fhc_match, | ||
258 | .probe = fhc_probe, | 258 | .probe = fhc_probe, |
259 | .driver = { | 259 | .driver = { |
260 | .name = "fhc", | 260 | .name = "fhc", |
261 | .owner = THIS_MODULE, | ||
262 | .of_match_table = fhc_match, | ||
261 | }, | 263 | }, |
262 | }; | 264 | }; |
263 | 265 | ||
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index 936879639eb6..870cb65b3f21 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
@@ -811,8 +811,11 @@ static const struct of_device_id us3mc_match[] = { | |||
811 | MODULE_DEVICE_TABLE(of, us3mc_match); | 811 | MODULE_DEVICE_TABLE(of, us3mc_match); |
812 | 812 | ||
813 | static struct of_platform_driver us3mc_driver = { | 813 | static struct of_platform_driver us3mc_driver = { |
814 | .name = "us3mc", | 814 | .driver = { |
815 | .match_table = us3mc_match, | 815 | .name = "us3mc", |
816 | .owner = THIS_MODULE, | ||
817 | .of_match_table = us3mc_match, | ||
818 | }, | ||
816 | .probe = us3mc_probe, | 819 | .probe = us3mc_probe, |
817 | .remove = __devexit_p(us3mc_remove), | 820 | .remove = __devexit_p(us3mc_remove), |
818 | }; | 821 | }; |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index ff844baa28e6..51cfa09e392a 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -508,8 +508,11 @@ static struct of_device_id __initdata fire_match[] = { | |||
508 | }; | 508 | }; |
509 | 509 | ||
510 | static struct of_platform_driver fire_driver = { | 510 | static struct of_platform_driver fire_driver = { |
511 | .name = DRIVER_NAME, | 511 | .driver = { |
512 | .match_table = fire_match, | 512 | .name = DRIVER_NAME, |
513 | .owner = THIS_MODULE, | ||
514 | .of_match_table = fire_match, | ||
515 | }, | ||
513 | .probe = fire_probe, | 516 | .probe = fire_probe, |
514 | }; | 517 | }; |
515 | 518 | ||
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index e675e21c6df6..558a70512824 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -602,8 +602,11 @@ static struct of_device_id __initdata psycho_match[] = { | |||
602 | }; | 602 | }; |
603 | 603 | ||
604 | static struct of_platform_driver psycho_driver = { | 604 | static struct of_platform_driver psycho_driver = { |
605 | .name = DRIVER_NAME, | 605 | .driver = { |
606 | .match_table = psycho_match, | 606 | .name = DRIVER_NAME, |
607 | .owner = THIS_MODULE, | ||
608 | .of_match_table = psycho_match, | ||
609 | }, | ||
607 | .probe = psycho_probe, | 610 | .probe = psycho_probe, |
608 | }; | 611 | }; |
609 | 612 | ||
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 5048498daade..6dad8e3b7506 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -596,8 +596,11 @@ static struct of_device_id __initdata sabre_match[] = { | |||
596 | }; | 596 | }; |
597 | 597 | ||
598 | static struct of_platform_driver sabre_driver = { | 598 | static struct of_platform_driver sabre_driver = { |
599 | .name = DRIVER_NAME, | 599 | .driver = { |
600 | .match_table = sabre_match, | 600 | .name = DRIVER_NAME, |
601 | .owner = THIS_MODULE, | ||
602 | .of_match_table = sabre_match, | ||
603 | }, | ||
601 | .probe = sabre_probe, | 604 | .probe = sabre_probe, |
602 | }; | 605 | }; |
603 | 606 | ||
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 2f3f9212b063..97a1ae2e1c02 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1491,8 +1491,11 @@ static struct of_device_id __initdata schizo_match[] = { | |||
1491 | }; | 1491 | }; |
1492 | 1492 | ||
1493 | static struct of_platform_driver schizo_driver = { | 1493 | static struct of_platform_driver schizo_driver = { |
1494 | .name = DRIVER_NAME, | 1494 | .driver = { |
1495 | .match_table = schizo_match, | 1495 | .name = DRIVER_NAME, |
1496 | .owner = THIS_MODULE, | ||
1497 | .of_match_table = schizo_match, | ||
1498 | }, | ||
1496 | .probe = schizo_probe, | 1499 | .probe = schizo_probe, |
1497 | }; | 1500 | }; |
1498 | 1501 | ||
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 5c11f56cedf8..a24af6f7e17f 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -1009,8 +1009,11 @@ static struct of_device_id __initdata pci_sun4v_match[] = { | |||
1009 | }; | 1009 | }; |
1010 | 1010 | ||
1011 | static struct of_platform_driver pci_sun4v_driver = { | 1011 | static struct of_platform_driver pci_sun4v_driver = { |
1012 | .name = DRIVER_NAME, | 1012 | .driver = { |
1013 | .match_table = pci_sun4v_match, | 1013 | .name = DRIVER_NAME, |
1014 | .owner = THIS_MODULE, | ||
1015 | .of_match_table = pci_sun4v_match, | ||
1016 | }, | ||
1014 | .probe = pci_sun4v_probe, | 1017 | .probe = pci_sun4v_probe, |
1015 | }; | 1018 | }; |
1016 | 1019 | ||
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c index 5e4563d86f19..9589d8b9b0c1 100644 --- a/arch/sparc/kernel/pmc.c +++ b/arch/sparc/kernel/pmc.c | |||
@@ -79,8 +79,11 @@ static struct of_device_id __initdata pmc_match[] = { | |||
79 | MODULE_DEVICE_TABLE(of, pmc_match); | 79 | MODULE_DEVICE_TABLE(of, pmc_match); |
80 | 80 | ||
81 | static struct of_platform_driver pmc_driver = { | 81 | static struct of_platform_driver pmc_driver = { |
82 | .name = "pmc", | 82 | .driver = { |
83 | .match_table = pmc_match, | 83 | .name = "pmc", |
84 | .owner = THIS_MODULE, | ||
85 | .of_match_table = pmc_match, | ||
86 | }, | ||
84 | .probe = pmc_probe, | 87 | .probe = pmc_probe, |
85 | }; | 88 | }; |
86 | 89 | ||
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index e3f806a7423b..168d4cb63f5b 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -60,10 +60,11 @@ static struct of_device_id __initdata power_match[] = { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | static struct of_platform_driver power_driver = { | 62 | static struct of_platform_driver power_driver = { |
63 | .match_table = power_match, | ||
64 | .probe = power_probe, | 63 | .probe = power_probe, |
65 | .driver = { | 64 | .driver = { |
66 | .name = "power", | 65 | .name = "power", |
66 | .owner = THIS_MODULE, | ||
67 | .of_match_table = power_match, | ||
67 | }, | 68 | }, |
68 | }; | 69 | }; |
69 | 70 | ||
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index e0dbed9503d4..217ba275cabf 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -185,10 +185,11 @@ static struct of_device_id __initdata clock_match[] = { | |||
185 | }; | 185 | }; |
186 | 186 | ||
187 | static struct of_platform_driver clock_driver = { | 187 | static struct of_platform_driver clock_driver = { |
188 | .match_table = clock_match, | ||
189 | .probe = clock_probe, | 188 | .probe = clock_probe, |
190 | .driver = { | 189 | .driver = { |
191 | .name = "rtc", | 190 | .name = "rtc", |
191 | .owner = THIS_MODULE, | ||
192 | .of_match_table = clock_match, | ||
192 | }, | 193 | }, |
193 | }; | 194 | }; |
194 | 195 | ||
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 9099ca095641..21e9fcae0668 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -463,10 +463,11 @@ static struct of_device_id __initdata rtc_match[] = { | |||
463 | }; | 463 | }; |
464 | 464 | ||
465 | static struct of_platform_driver rtc_driver = { | 465 | static struct of_platform_driver rtc_driver = { |
466 | .match_table = rtc_match, | ||
467 | .probe = rtc_probe, | 466 | .probe = rtc_probe, |
468 | .driver = { | 467 | .driver = { |
469 | .name = "rtc", | 468 | .name = "rtc", |
469 | .owner = THIS_MODULE, | ||
470 | .of_match_table = rtc_match, | ||
470 | }, | 471 | }, |
471 | }; | 472 | }; |
472 | 473 | ||
@@ -495,10 +496,11 @@ static struct of_device_id __initdata bq4802_match[] = { | |||
495 | }; | 496 | }; |
496 | 497 | ||
497 | static struct of_platform_driver bq4802_driver = { | 498 | static struct of_platform_driver bq4802_driver = { |
498 | .match_table = bq4802_match, | ||
499 | .probe = bq4802_probe, | 499 | .probe = bq4802_probe, |
500 | .driver = { | 500 | .driver = { |
501 | .name = "bq4802", | 501 | .name = "bq4802", |
502 | .owner = THIS_MODULE, | ||
503 | .of_match_table = bq4802_match, | ||
502 | }, | 504 | }, |
503 | }; | 505 | }; |
504 | 506 | ||
@@ -558,10 +560,11 @@ static struct of_device_id __initdata mostek_match[] = { | |||
558 | }; | 560 | }; |
559 | 561 | ||
560 | static struct of_platform_driver mostek_driver = { | 562 | static struct of_platform_driver mostek_driver = { |
561 | .match_table = mostek_match, | ||
562 | .probe = mostek_probe, | 563 | .probe = mostek_probe, |
563 | .driver = { | 564 | .driver = { |
564 | .name = "mostek", | 565 | .name = "mostek", |
566 | .owner = THIS_MODULE, | ||
567 | .of_match_table = mostek_match, | ||
565 | }, | 568 | }, |
566 | }; | 569 | }; |
567 | 570 | ||