aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ati.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/ati.c')
-rw-r--r--hw/display/ati.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/display/ati.c b/hw/display/ati.c
index 8d2501b..7de2773 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -742,7 +742,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
if (!s->cursor_guest_mode &&
(s->regs.crtc_gen_cntl & CRTC2_CUR_EN) && !(t & BIT(31))) {
dpy_mouse_set(s->vga.con, s->regs.cur_hv_pos >> 16,
- s->regs.cur_hv_pos & 0xffff, 1);
+ s->regs.cur_hv_pos & 0xffff, true);
}
break;
}
@@ -1039,7 +1039,7 @@ static void ati_vga_exit(PCIDevice *dev)
graphic_console_close(s->vga.con);
}
-static Property ati_vga_properties[] = {
+static const Property ati_vga_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", ATIVGAState, vga.vram_size_mb, 16),
DEFINE_PROP_STRING("model", ATIVGAState, model),
DEFINE_PROP_UINT16("x-device-id", ATIVGAState, dev_id,
@@ -1047,15 +1047,14 @@ static Property ati_vga_properties[] = {
DEFINE_PROP_BOOL("guest_hwcursor", ATIVGAState, cursor_guest_mode, false),
/* this is a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, DEFAULT_X_PIXMAN),
- DEFINE_PROP_END_OF_LIST()
};
-static void ati_vga_class_init(ObjectClass *klass, void *data)
+static void ati_vga_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- dc->reset = ati_vga_reset;
+ device_class_set_legacy_reset(dc, ati_vga_reset);
device_class_set_props(dc, ati_vga_properties);
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
@@ -1080,7 +1079,7 @@ static const TypeInfo ati_vga_info = {
.instance_size = sizeof(ATIVGAState),
.class_init = ati_vga_class_init,
.instance_init = ati_vga_init,
- .interfaces = (InterfaceInfo[]) {
+ .interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
},