summaryrefslogtreecommitdiffstats
path: root/hw/vga-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vga-isa.c')
-rw-r--r--hw/vga-isa.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/vga-isa.c b/hw/vga-isa.c
index cb6af91..8d3ff0d 100644
--- a/hw/vga-isa.c
+++ b/hw/vga-isa.c
@@ -71,20 +71,22 @@ static int vga_initfn(ISADevice *dev)
static void vga_class_initfn(ObjectClass *klass, void *data)
{
+ DeviceClass *dc = DEVICE_CLASS(klass);
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
ic->init = vga_initfn;
+ dc->reset = vga_reset_isa;
+ dc->vmsd = &vmstate_vga_common;
}
-static DeviceInfo vga_info = {
- .name = "isa-vga",
- .size = sizeof(ISAVGAState),
- .vmsd = &vmstate_vga_common,
- .reset = vga_reset_isa,
- .class_init = vga_class_initfn,
+static TypeInfo vga_info = {
+ .name = "isa-vga",
+ .parent = TYPE_ISA_DEVICE,
+ .instance_size = sizeof(ISAVGAState),
+ .class_init = vga_class_initfn,
};
static void vga_register(void)
{
- isa_qdev_register(&vga_info);
+ type_register_static(&vga_info);
}
device_init(vga_register)
OpenPOWER on IntegriCloud