Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/pci: Clean up direct access to sysdata by RTAS

We shouldn't directly access sysdata to get the device node but call
pci_bus_to_OF_node() for this purpose.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Kumar Gala and committed by
Benjamin Herrenschmidt
2f522976 95272262

+2 -8
+2 -8
arch/powerpc/kernel/rtas_pci.c
··· 93 93 { 94 94 struct device_node *busdn, *dn; 95 95 96 - if (bus->self) 97 - busdn = pci_device_to_OF_node(bus->self); 98 - else 99 - busdn = bus->sysdata; /* must be a phb */ 96 + busdn = pci_bus_to_OF_node(bus); 100 97 101 98 /* Search only direct children of the bus */ 102 99 for (dn = busdn->child; dn; dn = dn->sibling) { ··· 137 140 { 138 141 struct device_node *busdn, *dn; 139 142 140 - if (bus->self) 141 - busdn = pci_device_to_OF_node(bus->self); 142 - else 143 - busdn = bus->sysdata; /* must be a phb */ 143 + busdn = pci_bus_to_OF_node(bus); 144 144 145 145 /* Search only direct children of the bus */ 146 146 for (dn = busdn->child; dn; dn = dn->sibling) {