[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 2/4] pci_bridge: rename PCIBridge::bus -> PCIBrid
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 2/4] pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus. |
Date: |
Tue, 13 Jul 2010 13:01:40 +0900 |
To avoid confusion of primary bus with secondary bus,
rename PCIBridge::bus to PCIBridge::sec_bus.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci_bridge.c | 10 ++++------
hw/pci_internals.h | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c
index 7f27870..63052fe 100644
--- a/hw/pci_bridge.c
+++ b/hw/pci_bridge.c
@@ -138,8 +138,7 @@ static void pci_bridge_write_config(PCIDevice *d,
io base/limit upper 16 */
ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
PCIBridge *s = container_of(d, PCIBridge, dev);
- PCIBus *secondary_bus = &s->bus;
- pci_bridge_update_mappings(secondary_bus);
+ pci_bridge_update_mappings(&s->sec_bus);
}
}
@@ -164,8 +163,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;
}
@@ -182,8 +180,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;
--
1.7.1.1
- [Qemu-devel] [PATCH v3 0/4] pci: split out bridge code into pci_bridge and make it library, Isaku Yamahata, 2010/07/13
- [Qemu-devel] [PATCH v3 2/4] pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 3/4] pci_bridge: clean up: remove pci_{register, unregister}_secondary_bus(), Isaku Yamahata, 2010/07/13
- [Qemu-devel] [PATCH v3 4/4] pci_bridge: introduce pci bridge library., Isaku Yamahata, 2010/07/13
- [Qemu-devel] [PATCH v3 1/4] pci/bridge: split out pci bridge code into pci_bridge.c from pci.c, Isaku Yamahata, 2010/07/13
- Re: [Qemu-devel] [PATCH v3 0/4] pci: split out bridge code into pci_bridge and make it library, Isaku Yamahata, 2010/07/21