Skip to content

Commit

Permalink
powerpc/pci: Clean up direct access to sysdata on tsi108 platforms
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kumar Gala authored and Benjamin Herrenschmidt committed May 21, 2009
1 parent 8456993 commit bccd6f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/sysdev/tsi108_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfunc,
int offset, int len, u32 val)
{
volatile unsigned char *cfg_addr;
struct pci_controller *hose = bus->sysdata;
struct pci_controller *hose = pci_bus_to_host(bus);

if (ppc_md.pci_exclude_device)
if (ppc_md.pci_exclude_device(hose, bus->number, devfunc))
Expand Down Expand Up @@ -149,7 +149,7 @@ tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 * val)
{
volatile unsigned char *cfg_addr;
struct pci_controller *hose = bus->sysdata;
struct pci_controller *hose = pci_bus_to_host(bus);
u32 temp;

if (ppc_md.pci_exclude_device)
Expand Down

0 comments on commit bccd6f7

Please sign in to comment.