aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:13:02 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:10:40 -0400
commit4018294b53d1dae026880e45f174c1cc63b5d435 (patch)
tree6db3538eaf91b653381720a6d92f4f15634a93d0 /arch/sparc
parent597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (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/sparc')
-rw-r--r--arch/sparc/include/asm/parport.h7
-rw-r--r--arch/sparc/kernel/apc.c7
-rw-r--r--arch/sparc/kernel/auxio_64.c7
-rw-r--r--arch/sparc/kernel/central.c14
-rw-r--r--arch/sparc/kernel/chmc.c7
-rw-r--r--arch/sparc/kernel/pci_fire.c7
-rw-r--r--arch/sparc/kernel/pci_psycho.c7
-rw-r--r--arch/sparc/kernel/pci_sabre.c7
-rw-r--r--arch/sparc/kernel/pci_schizo.c7
-rw-r--r--arch/sparc/kernel/pci_sun4v.c7
-rw-r--r--arch/sparc/kernel/pmc.c7
-rw-r--r--arch/sparc/kernel/power.c7
-rw-r--r--arch/sparc/kernel/time_32.c7
-rw-r--r--arch/sparc/kernel/time_64.c21
14 files changed, 77 insertions, 42 deletions
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
234static struct of_platform_driver ecpp_driver = { 234static 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[] = {
174MODULE_DEVICE_TABLE(of, apc_match); 174MODULE_DEVICE_TABLE(of, apc_match);
175 175
176static struct of_platform_driver apc_driver = { 176static 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
134static struct of_platform_driver auxio_driver = { 134static 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
151static struct of_platform_driver clock_board_driver = { 151static 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
256static struct of_platform_driver fhc_driver = { 257static 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[] = {
811MODULE_DEVICE_TABLE(of, us3mc_match); 811MODULE_DEVICE_TABLE(of, us3mc_match);
812 812
813static struct of_platform_driver us3mc_driver = { 813static 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
510static struct of_platform_driver fire_driver = { 510static 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
604static struct of_platform_driver psycho_driver = { 604static 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
598static struct of_platform_driver sabre_driver = { 598static 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
1493static struct of_platform_driver schizo_driver = { 1493static 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
1011static struct of_platform_driver pci_sun4v_driver = { 1011static 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[] = {
79MODULE_DEVICE_TABLE(of, pmc_match); 79MODULE_DEVICE_TABLE(of, pmc_match);
80 80
81static struct of_platform_driver pmc_driver = { 81static 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
62static struct of_platform_driver power_driver = { 62static 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
187static struct of_platform_driver clock_driver = { 187static 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
465static struct of_platform_driver rtc_driver = { 465static 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
497static struct of_platform_driver bq4802_driver = { 498static 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
560static struct of_platform_driver mostek_driver = { 562static 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