aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-04 13:24:11 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-02-04 13:46:51 -0500
commitb5d937de0367d26f65b9af1aef5f2c34c1939be0 (patch)
treee91eaaa72ef1aae543a1fa494171f7e3c0c14d94 /arch/powerpc/kernel/pci_64.c
parent04bea68b2f0eeebb089ecc67b618795925268b4a (diff)
powerpc/pci: Make both ppc32 and ppc64 use sysdata for pci_controller
Currently, ppc32 uses sysdata for the pci_controller pointer, and ppc64 uses it to hold the device_node pointer. This patch moves the of_node pointer into (struct pci_bus*)->dev.of_node and (struct pci_dev*)->dev.of_node so that sysdata can be converted to always use the pci_controller pointer instead. It also fixes up the allocating of pci devices so that the of_node pointer gets assigned consistently and increments the ref count. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 851577608a78..fc6452b6be9f 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -64,7 +64,7 @@ static int __init pcibios_init(void)
64 64
65 /* Scan all of the recorded PCI controllers. */ 65 /* Scan all of the recorded PCI controllers. */
66 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 66 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
67 pcibios_scan_phb(hose, hose->dn); 67 pcibios_scan_phb(hose);
68 pci_bus_add_devices(hose->bus); 68 pci_bus_add_devices(hose->bus);
69 } 69 }
70 70
@@ -242,10 +242,10 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
242 break; 242 break;
243 bus = NULL; 243 bus = NULL;
244 } 244 }
245 if (bus == NULL || bus->sysdata == NULL) 245 if (bus == NULL || bus->dev.of_node == NULL)
246 return -ENODEV; 246 return -ENODEV;
247 247
248 hose_node = (struct device_node *)bus->sysdata; 248 hose_node = bus->dev.of_node;
249 hose = PCI_DN(hose_node)->phb; 249 hose = PCI_DN(hose_node)->phb;
250 250
251 switch (which) { 251 switch (which) {