summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-04-30 03:10:07 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-05-21 15:44:22 +1000
commit19afa40797a3b392b64bf0b30b46e62001eeb66f (patch)
tree21cfd1c6a149dd545a8168e13007afe145013861 /arch/powerpc/sysdev
parent60dbf4385130136847ea73657da329f8e7dbe16e (diff)
downloadop-kernel-dev-19afa40797a3b392b64bf0b30b46e62001eeb66f.zip
op-kernel-dev-19afa40797a3b392b64bf0b30b46e62001eeb66f.tar.gz
powerpc/pci: Clean up direct access to sysdata by indirect ops
We shouldn't directly access sysdata to get the pci_controller. Instead use pci_bus_to_host() for this purpose. In the future we might have sysdata be a device_node to match ppc64 and unify the code between ppc32 & ppc64. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index 7fd49c9..7ed8096 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -24,7 +24,7 @@ static int
indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val)
{
- struct pci_controller *hose = bus->sysdata;
+ struct pci_controller *hose = pci_bus_to_host(bus);
volatile void __iomem *cfg_data;
u8 cfg_type = 0;
u32 bus_no, reg;
@@ -82,7 +82,7 @@ static int
indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 val)
{
- struct pci_controller *hose = bus->sysdata;
+ struct pci_controller *hose = pci_bus_to_host(bus);
volatile void __iomem *cfg_data;
u8 cfg_type = 0;
u32 bus_no, reg;
OpenPOWER on IntegriCloud