PCI: designware: Use pci_is_root_bus() to check if bus is root bus
[linux-2.6-microblaze.git] / drivers / pci / controller / dwc / pci-keystone.c
index 790679f..fcc3586 100644 (file)
@@ -440,7 +440,7 @@ static int ks_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus,
 
        reg = CFG_BUS(bus->number) | CFG_DEVICE(PCI_SLOT(devfn)) |
                CFG_FUNC(PCI_FUNC(devfn));
-       if (bus->parent->number != pp->root_bus_nr)
+       if (!pci_is_root_bus(bus->parent))
                reg |= CFG_TYPE1;
        ks_pcie_app_writel(ks_pcie, CFG_SETUP, reg);
 
@@ -457,7 +457,7 @@ static int ks_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus,
 
        reg = CFG_BUS(bus->number) | CFG_DEVICE(PCI_SLOT(devfn)) |
                CFG_FUNC(PCI_FUNC(devfn));
-       if (bus->parent->number != pp->root_bus_nr)
+       if (!pci_is_root_bus(bus->parent))
                reg |= CFG_TYPE1;
        ks_pcie_app_writel(ks_pcie, CFG_SETUP, reg);