diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-29 23:10:14 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-21 01:44:23 -0400 |
commit | 2f52297665d2ebfaa24406003cf9e5a7b635f47d (patch) | |
tree | 18d1f894cd993ca46f31d47c954dab2062cb5757 /arch/powerpc/kernel | |
parent | 95272262aa43a85ad134c2ceeacb28e8b755ede1 (diff) |
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>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/rtas_pci.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 8869001ab5d7..54e66da8f743 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, | |||
93 | { | 93 | { |
94 | struct device_node *busdn, *dn; | 94 | struct device_node *busdn, *dn; |
95 | 95 | ||
96 | if (bus->self) | 96 | busdn = pci_bus_to_OF_node(bus); |
97 | busdn = pci_device_to_OF_node(bus->self); | ||
98 | else | ||
99 | busdn = bus->sysdata; /* must be a phb */ | ||
100 | 97 | ||
101 | /* Search only direct children of the bus */ | 98 | /* Search only direct children of the bus */ |
102 | for (dn = busdn->child; dn; dn = dn->sibling) { | 99 | for (dn = busdn->child; dn; dn = dn->sibling) { |
@@ -140,10 +137,7 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
140 | { | 137 | { |
141 | struct device_node *busdn, *dn; | 138 | struct device_node *busdn, *dn; |
142 | 139 | ||
143 | if (bus->self) | 140 | busdn = pci_bus_to_OF_node(bus); |
144 | busdn = pci_device_to_OF_node(bus->self); | ||
145 | else | ||
146 | busdn = bus->sysdata; /* must be a phb */ | ||
147 | 141 | ||
148 | /* Search only direct children of the bus */ | 142 | /* Search only direct children of the bus */ |
149 | for (dn = busdn->child; dn; dn = dn->sibling) { | 143 | for (dn = busdn->child; dn; dn = dn->sibling) { |