From 2f52297665d2ebfaa24406003cf9e5a7b635f47d Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 30 Apr 2009 03:10:14 +0000 Subject: 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 Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/rtas_pci.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'arch/powerpc/kernel') diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 8869001ab5d..54e66da8f74 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c @@ -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) { -- cgit v1.2.3