aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
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/powerpc/platforms
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/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpio.c14
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c7
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c8
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c3
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c7
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c7
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c7
7 files changed, 35 insertions, 18 deletions
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
195static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = { 195static 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
351static struct of_platform_driver mpc52xx_simple_gpiochip_driver = { 354static 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
786static struct of_platform_driver mpc52xx_gpt_driver = { 786static 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
539static struct of_platform_driver mpc52xx_lpbfifo_driver = { 539static 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[] = {
170static struct of_platform_driver ep8248e_mdio_driver = { 170static 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
425static struct of_platform_driver pmc_driver = { 425static 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
449static struct of_platform_driver axon_msi_driver = { 449static 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
302static struct of_platform_driver gpio_mdio_driver = 302static 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