aboutsummaryrefslogtreecommitdiff
path: root/hw/cirrus_vga.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:11:09 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:11:09 -0500
commitfdba9594df8eb2e2ac16bba95308e4159ffbb9e4 (patch)
treeae99a704abd1629e8f0a2de427814ad48bc85197 /hw/cirrus_vga.c
parent7ee28fd303003d70bb4c142e6ad4b92b7383b5b4 (diff)
parent0e6264db2c04dfad79be60240bfacfcaf47f9d6c (diff)
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
Diffstat (limited to 'hw/cirrus_vga.c')
-rw-r--r--hw/cirrus_vga.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 3c5043ecf9..f39d1f82ff 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3100,8 +3100,8 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
{
PCICirrusVGAState *d = DO_UPCAST(PCICirrusVGAState, dev, dev);
CirrusVGAState *s = &d->cirrus_vga;
- uint8_t *pci_conf = d->dev.config;
- int device_id = CIRRUS_ID_CLGD5446;
+ PCIDeviceInfo *info = DO_UPCAST(PCIDeviceInfo, qdev, dev->qdev.info);
+ int16_t device_id = info->device_id;
/* setup VGA */
vga_common_init(&s->vga, VGA_RAM_SIZE);
@@ -3111,9 +3111,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
&s->vga);
/* setup PCI */
- pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS);
- pci_config_set_device_id(pci_conf, device_id);
- pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
/* setup memory space */
/* memory #0 LFB */
@@ -3142,6 +3139,9 @@ static PCIDeviceInfo cirrus_vga_info = {
.init = pci_cirrus_vga_initfn,
.romfile = VGABIOS_CIRRUS_FILENAME,
.config_write = pci_cirrus_write_config,
+ .vendor_id = PCI_VENDOR_ID_CIRRUS,
+ .device_id = CIRRUS_ID_CLGD5446,
+ .class_id = PCI_CLASS_DISPLAY_VGA,
};
static void cirrus_vga_register(void)