linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] powerpc/pci: clean up direct access to sysdata by indirect ops
@ 2009-04-30 13:10 Kumar Gala
  2009-04-30 13:10 ` [PATCH 2/9] powerpc/pci: clean up direct access to sysdata by FSL platforms Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2009-04-30 13:10 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/sysdev/indirect_pci.c |    4 ++--
 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;
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-04-30 13:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 13:10 [PATCH 1/9] powerpc/pci: clean up direct access to sysdata by indirect ops Kumar Gala
2009-04-30 13:10 ` [PATCH 2/9] powerpc/pci: clean up direct access to sysdata by FSL platforms Kumar Gala
2009-04-30 13:10   ` [PATCH 3/9] powerpc/pci: clean up direct access to sysdata by 52xx platforms Kumar Gala
2009-04-30 13:10     ` [PATCH 4/9] powerpc/pci: clean up direct access to sysdata by 4xx platforms Kumar Gala
2009-04-30 13:10       ` [PATCH 5/9] powerpc/pci: clean up direct access to sysdata by CHRP platforms Kumar Gala
2009-04-30 13:10         ` [PATCH 6/9] powerpc/pci: clean up direct access to sysdata on tsi108 platforms Kumar Gala
2009-04-30 13:10           ` [PATCH 7/9] powerpc/pci: clean up direct access to sysdata by powermac platforms Kumar Gala
2009-04-30 13:10             ` [PATCH 8/9] powerpc/pci: clean up direct access to sysdata by RTAS Kumar Gala
2009-04-30 13:10               ` [PATCH 9/9] powerpc/pci: clean up direct access to sysdata by celleb platforms Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).