diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c index 6793a72edec2..28efce2dcb7d 100644 --- a/arch/mips/pci/ops-bridge.c +++ b/arch/mips/pci/ops-bridge.c @@ -170,7 +170,7 @@ static int pci_read_config(struct pci_bus *bus, u32 devfn, int where, int size, u32 *value) { - if (bus->number > 0) + if (!pci_is_root_bus(bus)) return pci_conf1_read_config(bus, devfn, where, size, value); return pci_conf0_read_config(bus, devfn, where, size, value); @@ -314,7 +314,7 @@ static int pci_write_config(struct pci_bus *bus, u32 devfn, int where, int size, u32 value) { - if (bus->number > 0) + if (!pci_is_root_bus(bus)) return pci_conf1_write_config(bus, devfn, where, size, value); return pci_conf0_write_config(bus, devfn, where, size, value);