Patchwork [1/6] Fix pci_vga_init() not to ignore bus argument

login
register
mail settings
Submitter Markus Armbruster
Date Sept. 25, 2009, 1:53 a.m.
Message ID <187e449af41d81e8efb449bc73deb9a4d95c80bb.1253843232.git.armbru@redhat.com>
Download mbox | patch
Permalink /patch/34246/
State Superseded
Headers show

Comments

Markus Armbruster - Sept. 25, 2009, 1:53 a.m.
Commit a414c306 converted all VGA devices to qdev.  It used
pci_create_simple() for all devices, except for this one it used
pci_create().  That's wrong, because it uses PCI bus#0 regardless of
the bus argument.  Fix by switching to pci_create_noinit().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/vga-pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 6038cec..129ff48 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -137,7 +137,7 @@  int pci_vga_init(PCIBus *bus,
 {
     PCIDevice *dev;
 
-    dev = pci_create("VGA", NULL);
+    dev = pci_create_noinit(bus, -1, "VGA");
     qdev_prop_set_uint32(&dev->qdev, "bios-offset", vga_bios_offset);
     qdev_prop_set_uint32(&dev->qdev, "bios-size", vga_bios_offset);
     qdev_init(&dev->qdev);