[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/7] qdev/pci: misc fixes.
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 5/7] qdev/pci: misc fixes. |
Date: |
Tue, 30 Jun 2009 14:12:11 +0200 |
* fix secondary bus setup.
* use base->name instead of "FIXME" for device name.
Yes, the device name is redundant. Only for drivers converted
to qdev already though. Once all drivers are converted we can
and should kill it.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index fa618ee..9c7289a 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -134,7 +134,8 @@ PCIBus *pci_register_bus(DeviceState *parent, const char
*name,
static PCIBus *pci_register_secondary_bus(PCIDevice *dev, pci_map_irq_fn
map_irq)
{
PCIBus *bus;
- bus = qemu_mallocz(sizeof(PCIBus));
+
+ bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, &dev->qdev, NULL));
bus->map_irq = map_irq;
bus->parent_dev = dev;
bus->next = dev->bus->next;
@@ -890,7 +891,7 @@ static void pci_qdev_init(DeviceState *qdev, DeviceInfo
*base)
bus = FROM_QBUS(PCIBus, qdev_get_parent_bus(qdev));
devfn = qdev_get_prop_int(qdev, "devfn", -1);
- pci_dev = do_pci_register_device(pci_dev, bus, "FIXME", devfn,
+ pci_dev = do_pci_register_device(pci_dev, bus, base->name, devfn,
info->config_read, info->config_write);
assert(pci_dev);
info->init(pci_dev);
--
1.6.2.5
- Re: [Qemu-devel] [PATCH 6/8] qdev/pci: misc fixes., (continued)
- [Qemu-devel] [PATCH 2/8] qdev: replace bus_type enum with bus_info struct., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 5/8] qdev/core: add monitor command to list all drivers, Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 7/8] qdev: convert es1370., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 1/8] qdev: update pci device registration., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 8/8] qdev: convert ac97., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 0/7] qdev patches, batch #1, Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 4/7] qdev/core: add monitor command to list all drivers, Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 3/7] qdev: remove DeviceType, Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 2/7] qdev: replace bus_type enum with bus_info struct., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 5/7] qdev/pci: misc fixes.,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 1/7] qdev: update pci device registration., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 7/7] qdev: convert ac97., Gerd Hoffmann, 2009/06/30
- [Qemu-devel] [PATCH 6/7] qdev: convert es1370., Gerd Hoffmann, 2009/06/30