diff options
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index f70e787d556f..eca8ccc3fa12 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -19,11 +19,11 @@ | |||
19 | #include <linux/mod_devicetable.h> | 19 | #include <linux/mod_devicetable.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/of_device.h> | ||
23 | #include <linux/of_platform.h> | ||
22 | 24 | ||
23 | #include <asm/errno.h> | 25 | #include <asm/errno.h> |
24 | #include <asm/dcr.h> | 26 | #include <asm/dcr.h> |
25 | #include <asm/of_device.h> | ||
26 | #include <asm/of_platform.h> | ||
27 | #include <asm/topology.h> | 27 | #include <asm/topology.h> |
28 | #include <asm/pci-bridge.h> | 28 | #include <asm/pci-bridge.h> |
29 | #include <asm/ppc-pci.h> | 29 | #include <asm/ppc-pci.h> |
@@ -70,7 +70,10 @@ postcore_initcall(of_bus_driver_init); | |||
70 | int of_register_platform_driver(struct of_platform_driver *drv) | 70 | int of_register_platform_driver(struct of_platform_driver *drv) |
71 | { | 71 | { |
72 | /* initialize common driver fields */ | 72 | /* initialize common driver fields */ |
73 | drv->driver.name = drv->name; | 73 | if (!drv->driver.name) |
74 | drv->driver.name = drv->name; | ||
75 | if (!drv->driver.owner) | ||
76 | drv->driver.owner = drv->owner; | ||
74 | drv->driver.bus = &of_platform_bus_type; | 77 | drv->driver.bus = &of_platform_bus_type; |
75 | 78 | ||
76 | /* register with core */ | 79 | /* register with core */ |
@@ -385,9 +388,11 @@ static struct of_device_id of_pci_phb_ids[] = { | |||
385 | }; | 388 | }; |
386 | 389 | ||
387 | static struct of_platform_driver of_pci_phb_driver = { | 390 | static struct of_platform_driver of_pci_phb_driver = { |
388 | .name = "of-pci", | 391 | .match_table = of_pci_phb_ids, |
389 | .match_table = of_pci_phb_ids, | 392 | .probe = of_pci_phb_probe, |
390 | .probe = of_pci_phb_probe, | 393 | .driver = { |
394 | .name = "of-pci", | ||
395 | }, | ||
391 | }; | 396 | }; |
392 | 397 | ||
393 | static __init int of_pci_phb_init(void) | 398 | static __init int of_pci_phb_init(void) |