summaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-04-02 18:31:53 -0700
committerBjorn Helgaas <bhelgaas@google.com>2012-04-30 13:53:42 -0600
commit7b54366358008241f88228f02cc80ab352265eac (patch)
tree4de6ae8ce83afabf1b4405cba6895b09d1bc790d /include/linux/pci.h
parent459f58ce51e2e11235b7bb4b1732ebf3c17d86f7 (diff)
downloadop-kernel-dev-7b54366358008241f88228f02cc80ab352265eac.zip
op-kernel-dev-7b54366358008241f88228f02cc80ab352265eac.tar.gz
PCI: add generic device into pci_host_bridge struct
Use that device for pci_root_bus bridge pointer. Use pci_release_bus_bridge_dev() to release allocated pci_host_bridge in remove path. Use root bus bridge pointer to get host bridge pointer instead of searching host bridge list. That leaves the host bridge list unused, so remove it. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e444f5b..8f4f29d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -375,11 +375,13 @@ struct pci_host_bridge_window {
};
struct pci_host_bridge {
- struct list_head list;
+ struct device dev;
struct pci_bus *bus; /* root bus */
struct list_head windows; /* pci_host_bridge_windows */
};
+#define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
+
/*
* The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
* to P2P or CardBus bridge windows) go in a table. Additional ones (for
OpenPOWER on IntegriCloud