cirrus_vga: QOMify
QOMify pci-cirrus-vga like isa-cirrus-vga device. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
62bf3df432
commit
d338bae33a
@ -235,6 +235,10 @@ typedef struct PCICirrusVGAState {
|
||||
CirrusVGAState cirrus_vga;
|
||||
} PCICirrusVGAState;
|
||||
|
||||
#define TYPE_PCI_CIRRUS_VGA "cirrus-vga"
|
||||
#define PCI_CIRRUS_VGA(obj) \
|
||||
OBJECT_CHECK(PCICirrusVGAState, (obj), TYPE_PCI_CIRRUS_VGA)
|
||||
|
||||
#define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga"
|
||||
#define ISA_CIRRUS_VGA(obj) \
|
||||
OBJECT_CHECK(ISACirrusVGAState, (obj), TYPE_ISA_CIRRUS_VGA)
|
||||
@ -3008,7 +3012,7 @@ static const TypeInfo isa_cirrus_vga_info = {
|
||||
|
||||
static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
|
||||
{
|
||||
PCICirrusVGAState *d = DO_UPCAST(PCICirrusVGAState, dev, dev);
|
||||
PCICirrusVGAState *d = PCI_CIRRUS_VGA(dev);
|
||||
CirrusVGAState *s = &d->cirrus_vga;
|
||||
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
|
||||
int16_t device_id = pc->device_id;
|
||||
@ -3070,7 +3074,7 @@ static void cirrus_vga_class_init(ObjectClass *klass, void *data)
|
||||
}
|
||||
|
||||
static const TypeInfo cirrus_vga_info = {
|
||||
.name = "cirrus-vga",
|
||||
.name = TYPE_PCI_CIRRUS_VGA,
|
||||
.parent = TYPE_PCI_DEVICE,
|
||||
.instance_size = sizeof(PCICirrusVGAState),
|
||||
.class_init = cirrus_vga_class_init,
|
||||
|
Loading…
Reference in New Issue
Block a user