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/powerpc/sysdev | |
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/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 8 | ||||
-rw-r--r-- | arch/powerpc/sysdev/bestcomm/bestcomm.c | 10 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pmc.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/pmi.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 7 |
7 files changed, 32 insertions, 21 deletions
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 | }; |