mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
95272262aa
commit
2f52297665
1 changed files with 2 additions and 8 deletions
|
@ -93,10 +93,7 @@ static int rtas_pci_read_config(struct pci_bus *bus,
|
|||
{
|
||||
struct device_node *busdn, *dn;
|
||||
|
||||
if (bus->self)
|
||||
busdn = pci_device_to_OF_node(bus->self);
|
||||
else
|
||||
busdn = bus->sysdata; /* must be a phb */
|
||||
busdn = pci_bus_to_OF_node(bus);
|
||||
|
||||
/* Search only direct children of the bus */
|
||||
for (dn = busdn->child; dn; dn = dn->sibling) {
|
||||
|
@ -140,10 +137,7 @@ static int rtas_pci_write_config(struct pci_bus *bus,
|
|||
{
|
||||
struct device_node *busdn, *dn;
|
||||
|
||||
if (bus->self)
|
||||
busdn = pci_device_to_OF_node(bus->self);
|
||||
else
|
||||
busdn = bus->sysdata; /* must be a phb */
|
||||
busdn = pci_bus_to_OF_node(bus);
|
||||
|
||||
/* Search only direct children of the bus */
|
||||
for (dn = busdn->child; dn; dn = dn->sibling) {
|
||||
|
|
Loading…
Reference in a new issue