mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 11:28:32 +00:00
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>
This commit is contained in:
parent
60dbf43851
commit
19afa40797
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ static int
|
||||||
indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
|
indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
|
||||||
int len, u32 *val)
|
int len, u32 *val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose = bus->sysdata;
|
struct pci_controller *hose = pci_bus_to_host(bus);
|
||||||
volatile void __iomem *cfg_data;
|
volatile void __iomem *cfg_data;
|
||||||
u8 cfg_type = 0;
|
u8 cfg_type = 0;
|
||||||
u32 bus_no, reg;
|
u32 bus_no, reg;
|
||||||
|
@ -82,7 +82,7 @@ static int
|
||||||
indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
|
indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
|
||||||
int len, u32 val)
|
int len, u32 val)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose = bus->sysdata;
|
struct pci_controller *hose = pci_bus_to_host(bus);
|
||||||
volatile void __iomem *cfg_data;
|
volatile void __iomem *cfg_data;
|
||||||
u8 cfg_type = 0;
|
u8 cfg_type = 0;
|
||||||
u32 bus_no, reg;
|
u32 bus_no, reg;
|
||||||
|
|
Loading…
Reference in a new issue