aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-04-02 21:31:53 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-04-30 15:53:42 -0400
commit7b54366358008241f88228f02cc80ab352265eac (patch)
tree4de6ae8ce83afabf1b4405cba6895b09d1bc790d /include/linux/pci.h
parent459f58ce51e2e11235b7bb4b1732ebf3c17d86f7 (diff)
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 e444f5b49118..8f4f29d2b606 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -375,11 +375,13 @@ struct pci_host_bridge_window {
375}; 375};
376 376
377struct pci_host_bridge { 377struct pci_host_bridge {
378 struct list_head list; 378 struct device dev;
379 struct pci_bus *bus; /* root bus */ 379 struct pci_bus *bus; /* root bus */
380 struct list_head windows; /* pci_host_bridge_windows */ 380 struct list_head windows; /* pci_host_bridge_windows */
381}; 381};
382 382
383#define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
384
383/* 385/*
384 * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond 386 * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
385 * to P2P or CardBus bridge windows) go in a table. Additional ones (for 387 * to P2P or CardBus bridge windows) go in a table. Additional ones (for