Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[pandora-kernel.git] / arch / powerpc / kernel / pci-common.c
index 4f13413..0187829 100644 (file)
@@ -107,7 +107,7 @@ static resource_size_t pcibios_io_size(const struct pci_controller *hose)
 #ifdef CONFIG_PPC64
        return hose->pci_io_size;
 #else
-       return hose->io_resource.end - hose->io_resource.start + 1;
+       return resource_size(&hose->io_resource);
 #endif
 }
 
@@ -1097,9 +1097,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
                if (dev->is_added)
                        continue;
 
-               /* Setup OF node pointer in the device */
-               dev->dev.of_node = pci_device_to_OF_node(dev);
-
                /* Fixup NUMA node as it may not be setup yet by the generic
                 * code and is needed by the DMA init
                 */
@@ -1685,6 +1682,13 @@ int early_find_capability(struct pci_controller *hose, int bus, int devfn,
        return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap);
 }
 
+struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
+{
+       struct pci_controller *hose = bus->sysdata;
+
+       return of_node_get(hose->dn);
+}
+
 /**
  * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
  * @hose: Pointer to the PCI host controller instance structure
@@ -1705,7 +1709,6 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
                        hose->global_number);
                return;
        }
-       bus->dev.of_node = of_node_get(node);
        bus->secondary = hose->first_busno;
        hose->bus = bus;