Revision 5b96d8f9 hw/cirrus_vga.c

b/hw/cirrus_vga.c
3097 3097
{
3098 3098
     PCICirrusVGAState *d = DO_UPCAST(PCICirrusVGAState, dev, dev);
3099 3099
     CirrusVGAState *s = &d->cirrus_vga;
3100
     uint8_t *pci_conf = d->dev.config;
3101
     int device_id = CIRRUS_ID_CLGD5446;
3100
     PCIDeviceInfo *info = DO_UPCAST(PCIDeviceInfo, qdev, dev->qdev.info);
3101
     int16_t device_id = info->device_id;
3102 3102

  
3103 3103
     /* setup VGA */
3104 3104
     vga_common_init(&s->vga, VGA_RAM_SIZE);
......
3108 3108
                                      &s->vga);
3109 3109

  
3110 3110
     /* setup PCI */
3111
     pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS);
3112
     pci_config_set_device_id(pci_conf, device_id);
3113
     pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
3114 3111

  
3115 3112
     /* setup memory space */
3116 3113
     /* memory #0 LFB */
......
3139 3136
    .init         = pci_cirrus_vga_initfn,
3140 3137
    .romfile      = VGABIOS_CIRRUS_FILENAME,
3141 3138
    .config_write = pci_cirrus_write_config,
3139
    .vendor_id    = PCI_VENDOR_ID_CIRRUS,
3140
    .device_id    = CIRRUS_ID_CLGD5446,
3141
    .class_id     = PCI_CLASS_DISPLAY_VGA,
3142 3142
};
3143 3143

  
3144 3144
static void cirrus_vga_register(void)

Also available in: Unified diff