diff mbox

[v2,3/5] pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus.

Message ID 462c32a08da7d99fad73516b77e05b487855d9ee.1278930415.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata July 12, 2010, 10:36 a.m. UTC
To avoid confusion of primary bus with secondary bus,
rename PCIBridge::bus to PCIBridge::sec_bus.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/pci_bridge.c    |    7 +++----
 hw/pci_internals.h |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c
index 3f69a44..a5c4ece 100644
--- a/hw/pci_bridge.c
+++ b/hw/pci_bridge.c
@@ -162,8 +162,7 @@  static int pci_bridge_initfn(PCIDevice *dev)
 static int pci_bridge_exitfn(PCIDevice *pci_dev)
 {
     PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
-    PCIBus *bus = &s->bus;
-    pci_unregister_secondary_bus(bus);
+    pci_unregister_secondary_bus(&s->sec_bus);
     return 0;
 }
 
@@ -180,8 +179,8 @@  PCIBus *pci_bridge_init(PCIBus *bus, int devfn, bool multifunction,
     qdev_init_nofail(&dev->qdev);
 
     s = DO_UPCAST(PCIBridge, dev, dev);
-    pci_register_secondary_bus(bus, &s->bus, &s->dev, map_irq, name);
-    return &s->bus;
+    pci_register_secondary_bus(bus, &s->sec_bus, &s->dev, map_irq, name);
+    return &s->sec_bus;
 }
 
 static PCIDeviceInfo bridge_info = {
diff --git a/hw/pci_internals.h b/hw/pci_internals.h
index 8a3026b..fa844ab 100644
--- a/hw/pci_internals.h
+++ b/hw/pci_internals.h
@@ -32,7 +32,7 @@  struct PCIBus {
 
 typedef struct {
     PCIDevice dev;
-    PCIBus bus;
+    PCIBus sec_bus;
     uint32_t vid;
     uint32_t did;
 } PCIBridge;