aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-10 09:41:42 +0200
committerPaul Brook <paul@codesourcery.com>2009-06-11 13:47:36 +0100
commit074f2fff798cb8f9588080b740dc356217a24720 (patch)
tree4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/pci.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadqemu-074f2fff798cb8f9588080b740dc356217a24720.zip
qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.bz2
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 8c904ba..a3af3b5 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -924,11 +924,13 @@ void pci_qdev_register(const char *name, int size, pci_qdev_initfn init)
PCIDeviceInfo *info;
info = qemu_mallocz(sizeof(*info));
+ info->qdev.name = qemu_strdup(name);
+ info->qdev.size = size;
info->init = init;
info->qdev.init = pci_qdev_init;
info->qdev.bus_type = BUS_TYPE_PCI;
- qdev_register(name, size, &info->qdev);
+ qdev_register(&info->qdev);
}
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)