summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-13 22:17:04 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-16 08:36:18 +0100
commitc3c5a5f51300e34581ab76c6b078dc9637b5c4ce (patch)
treefe3f612a4a9af5157350851f058cfcb740b0d8be /drivers/pci
parentbebb18084c5c906a42af405315adbd3beb2e40bd (diff)
downloadbarebox-c3c5a5f51300e34581ab76c6b078dc9637b5c4ce.tar.gz
barebox-c3c5a5f51300e34581ab76c6b078dc9637b5c4ce.tar.xz
PCI: Drop "ops" from struct pci_bus
Drop "ops" from struct pci_bus, since the same struct can be accessed via host->pci_ops. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c6
-rw-r--r--drivers/pci/pci_iomap.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index f358d556f2..a52475e6ab 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -48,7 +48,6 @@ void register_pci_controller(struct pci_controller *hose)
hose->bus = bus;
bus->parent = hose->parent;
bus->host = hose;
- bus->ops = hose->pci_ops;
bus->resource[PCI_BUS_RESOURCE_MEM] = hose->mem_resource;
bus->resource[PCI_BUS_RESOURCE_MEM_PREF] = hose->mem_pref_resource;
bus->resource[PCI_BUS_RESOURCE_IO] = hose->io_resource;
@@ -97,7 +96,7 @@ int pci_bus_read_config_##size \
int res; \
u32 data = 0; \
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
- res = bus->ops->read(bus, devfn, pos, len, &data); \
+ res = bus->host->pci_ops->read(bus, devfn, pos, len, &data); \
*value = (type)data; \
return res; \
}
@@ -108,7 +107,7 @@ int pci_bus_write_config_##size \
{ \
int res; \
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
- res = bus->ops->write(bus, devfn, pos, len, value); \
+ res = bus->host->pci_ops->write(bus, devfn, pos, len, value); \
return res; \
}
@@ -421,7 +420,6 @@ static unsigned int pci_scan_bus(struct pci_bus *bus)
child_bus = pci_alloc_bus();
/* inherit parent properties */
child_bus->host = bus->host;
- child_bus->ops = bus->host->pci_ops;
child_bus->parent_bus = bus;
child_bus->resource[PCI_BUS_RESOURCE_MEM] =
bus->resource[PCI_BUS_RESOURCE_MEM];
diff --git a/drivers/pci/pci_iomap.c b/drivers/pci/pci_iomap.c
index a56f61dc1a..2c58c0c0f9 100644
--- a/drivers/pci/pci_iomap.c
+++ b/drivers/pci/pci_iomap.c
@@ -24,6 +24,6 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar)
struct pci_bus *bus = dev->bus;
resource_size_t start = pci_resource_start(dev, bar);
- return (void *)bus->ops->res_start(bus, start);
+ return (void *)bus->host->pci_ops->res_start(bus, start);
}
EXPORT_SYMBOL(pci_iomap);