aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-03-10 08:31:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-05-16 10:24:11 -0400
commit43ba990bb7bf741f4b2f405b35dc02823d68a682 (patch)
treec32201f703e096c2fcd98a76c217052de4e37d07 /arch/arm/mach-kirkwood
parentc23bfc3835173f5229b2503e3b616001a28affad (diff)
ARM: PCI: dove/kirkwood/mv78xx0: use sys->private_data
Use sys->private_data to store the PCIe port data structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/pcie.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index b1034b02867..de373176ee6 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -44,12 +44,6 @@ struct pcie_port {
44static int pcie_port_map[2]; 44static int pcie_port_map[2];
45static int num_pcie_ports; 45static int num_pcie_ports;
46 46
47static inline struct pcie_port *bus_to_port(struct pci_bus *bus)
48{
49 struct pci_sys_data *sys = bus->sysdata;
50 return sys->private_data;
51}
52
53static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) 47static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
54{ 48{
55 /* 49 /*
@@ -79,7 +73,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
79static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, 73static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
80 int size, u32 *val) 74 int size, u32 *val)
81{ 75{
82 struct pcie_port *pp = bus_to_port(bus); 76 struct pci_sys_data *sys = bus->sysdata;
77 struct pcie_port *pp = sys->private_data;
83 unsigned long flags; 78 unsigned long flags;
84 int ret; 79 int ret;
85 80
@@ -98,7 +93,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
98static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, 93static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
99 int where, int size, u32 val) 94 int where, int size, u32 val)
100{ 95{
101 struct pcie_port *pp = bus_to_port(bus); 96 struct pci_sys_data *sys = bus->sysdata;
97 struct pcie_port *pp = sys->private_data;
102 unsigned long flags; 98 unsigned long flags;
103 int ret; 99 int ret;
104 100
@@ -248,7 +244,8 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
248static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, 244static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
249 u8 pin) 245 u8 pin)
250{ 246{
251 struct pcie_port *pp = bus_to_port(dev->bus); 247 struct pci_sys_data *sys = dev->sysdata;
248 struct pcie_port *pp = sys->private_data;
252 249
253 return pp->irq; 250 return pp->irq;
254} 251}