diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-30 07:10:15 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-21 09:44:24 +0400 |
commit | 58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd (patch) | |
tree | 585debc810954d0cac80619c85d5a5ab50ceda41 /arch/powerpc/platforms/cell/celleb_pci.c | |
parent | 2f52297665d2ebfaa24406003cf9e5a7b635f47d (diff) | |
download | linux-58513dc40d8e01f0c0ccea4cdcbc32e9dcee62fd.tar.xz |
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_pci.c')
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_pci.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c index f39a3b2a1667..00eaaa71630f 100644 --- a/arch/powerpc/platforms/cell/celleb_pci.c +++ b/arch/powerpc/platforms/cell/celleb_pci.c @@ -162,8 +162,7 @@ static int celleb_fake_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) { char *config; - struct device_node *node; - struct pci_controller *hose; + struct pci_controller *hose = pci_bus_to_host(bus); unsigned int devno = devfn >> 3; unsigned int fn = devfn & 0x7; @@ -171,8 +170,6 @@ static int celleb_fake_pci_read_config(struct pci_bus *bus, BUG_ON(where % size); pr_debug(" fake read: bus=0x%x, ", bus->number); - node = (struct device_node *)bus->sysdata; - hose = pci_find_hose_for_OF_device(node); config = get_fake_config_start(hose, devno, fn); pr_debug("devno=0x%x, where=0x%x, size=0x%x, ", devno, where, size); @@ -192,8 +189,7 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { char *config; - struct device_node *node; - struct pci_controller *hose; + struct pci_controller *hose = pci_bus_to_host(bus); struct celleb_pci_resource *res; unsigned int devno = devfn >> 3; unsigned int fn = devfn & 0x7; @@ -201,8 +197,6 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus, /* allignment check */ BUG_ON(where % size); - node = (struct device_node *)bus->sysdata; - hose = pci_find_hose_for_OF_device(node); config = get_fake_config_start(hose, devno, fn); if (!config) |