Merge tag 'locks-v4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton...
[sfrench/cifs-2.6.git] / arch / mips / pci / ops-bridge.c
index 57e1463fcd02e072e79ede3b5a80c94909ed0dc2..a1d2c4ae0d1b56ca26069f9a929327297e034877 100644 (file)
@@ -167,7 +167,7 @@ oh_my_gawd:
 static int pci_read_config(struct pci_bus *bus, unsigned int 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);
@@ -310,7 +310,7 @@ oh_my_gawd:
 static int pci_write_config(struct pci_bus *bus, unsigned int 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);