summaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorJoshua Kinard2017-10-17 20:26:12 +0200
committerPaul Burton2018-06-24 18:27:27 +0200
commit8fd2d6ea66272f849943269c7ea771ce85fd8fb1 (patch)
tree9c2eabd2a77b4bc701621759ad7e5d1d85dd1f01 /arch/mips/pci
parentMIPS: Schedule on CPUs we need to lose FPU for a mode switch (diff)
downloadkernel-qcow2-linux-8fd2d6ea66272f849943269c7ea771ce85fd8fb1.tar.gz
kernel-qcow2-linux-8fd2d6ea66272f849943269c7ea771ce85fd8fb1.tar.xz
kernel-qcow2-linux-8fd2d6ea66272f849943269c7ea771ce85fd8fb1.zip
MIPS: Use !pci_is_root_bus(bus) in ops-bridge.c
This is a manual cherrypick of commit c7ddc3d137b7 from Alastair Bridgewater's IP35 tree that replaces two cases of "if (bus->number > 0)" with a more correct "if (!pci_is_root_bus(bus))" in arch/mips/pci/ops-bridge.c. Cc: linux-mips@linux-mips.org Cc: Alastair Bridgewater <alastair.bridgewater@gmail.com> Suggested-by: Alastair Bridgewater <alastair.bridgewater@gmail.com> Signed-off-by: Joshua Kinard <kumba@gentoo.org> Patchwork: https://patchwork.linux-mips.org/patch/17501/ Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Linux/MIPS <linux-mips@linux-mips.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/ops-bridge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c
index 57e1463fcd02..a1d2c4ae0d1b 100644
--- a/arch/mips/pci/ops-bridge.c
+++ b/arch/mips/pci/ops-bridge.c
@@ -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);