summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/celleb_scc_epci.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-04-30 03:10:15 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-05-21 15:44:24 +1000
commit58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd (patch)
tree585debc810954d0cac80619c85d5a5ab50ceda41 /arch/powerpc/platforms/cell/celleb_scc_epci.c
parent2f52297665d2ebfaa24406003cf9e5a7b635f47d (diff)
downloadop-kernel-dev-58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd.zip
op-kernel-dev-58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd.tar.gz
powerpc/pci: Clean up direct access to sysdata by celleb platforms
We shouldn't directly access sysdata to get the device node to just go get the pci_controller. We can call pci_bus_to_host() 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/platforms/cell/celleb_scc_epci.c')
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_epci.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_scc_epci.c b/arch/powerpc/platforms/cell/celleb_scc_epci.c
index 48ec88a..05b0db3 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_epci.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_epci.c
@@ -134,15 +134,11 @@ static int celleb_epci_read_config(struct pci_bus *bus,
{
PCI_IO_ADDR epci_base;
PCI_IO_ADDR addr;
- struct device_node *node;
- struct pci_controller *hose;
+ struct pci_controller *hose = pci_bus_to_host(bus);
/* allignment check */
BUG_ON(where % size);
- node = (struct device_node *)bus->sysdata;
- hose = pci_find_hose_for_OF_device(node);
-
if (!celleb_epci_get_epci_cfg(hose))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -198,16 +194,11 @@ static int celleb_epci_write_config(struct pci_bus *bus,
{
PCI_IO_ADDR epci_base;
PCI_IO_ADDR addr;
- struct device_node *node;
- struct pci_controller *hose;
+ struct pci_controller *hose = pci_bus_to_host(bus);
/* allignment check */
BUG_ON(where % size);
- node = (struct device_node *)bus->sysdata;
- hose = pci_find_hose_for_OF_device(node);
-
-
if (!celleb_epci_get_epci_cfg(hose))
return PCIBIOS_DEVICE_NOT_FOUND;
OpenPOWER on IntegriCloud