diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-29 23:10:10 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-21 01:44:23 -0400 |
commit | f159edaef31da2ba01511d1f7b2fe22bb048290f (patch) | |
tree | 18b4c46efd1844999828eaa56e48d091814827a0 /arch/powerpc/sysdev | |
parent | 5b21fb8e769d2cd798ba2ffb051cd576390a568f (diff) |
powerpc/pci: Clean up direct access to sysdata by 4xx platforms
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/ppc4xx_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 6a2d473c345a..daefc93ddffe 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -1295,7 +1295,7 @@ static void __iomem *ppc4xx_pciex_get_config_base(struct ppc4xx_pciex_port *port | |||
1295 | static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn, | 1295 | static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn, |
1296 | int offset, int len, u32 *val) | 1296 | int offset, int len, u32 *val) |
1297 | { | 1297 | { |
1298 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1298 | struct pci_controller *hose = pci_bus_to_host(bus); |
1299 | struct ppc4xx_pciex_port *port = | 1299 | struct ppc4xx_pciex_port *port = |
1300 | &ppc4xx_pciex_ports[hose->indirect_type]; | 1300 | &ppc4xx_pciex_ports[hose->indirect_type]; |
1301 | void __iomem *addr; | 1301 | void __iomem *addr; |
@@ -1352,7 +1352,7 @@ static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn, | |||
1352 | static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn, | 1352 | static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn, |
1353 | int offset, int len, u32 val) | 1353 | int offset, int len, u32 val) |
1354 | { | 1354 | { |
1355 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1355 | struct pci_controller *hose = pci_bus_to_host(bus); |
1356 | struct ppc4xx_pciex_port *port = | 1356 | struct ppc4xx_pciex_port *port = |
1357 | &ppc4xx_pciex_ports[hose->indirect_type]; | 1357 | &ppc4xx_pciex_ports[hose->indirect_type]; |
1358 | void __iomem *addr; | 1358 | void __iomem *addr; |