summary refs log tree commit diff stats
path: root/hw/display/sm501.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-13 14:04:18 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-04-16 09:03:49 +0200
commit380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (patch)
treee8097697817029ca6d545b8f68ba9761fb0f8164 /hw/display/sm501.c
parent27be55872dd747c733a42a3d90864d9f59272d26 (diff)
downloadfocaccia-qemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.tar.gz
focaccia-qemu-380cd056ec0e7fc8bbd553cdcb061d3ca612bb82.zip
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/sm501.c')
-rw-r--r--hw/display/sm501.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index e57ff223be..f0e6d7022f 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -1383,6 +1383,10 @@ static void sm501_update_display(void *opaque)
 	sm501_draw_crt(s);
 }
 
+static const GraphicHwOps sm501_ops = {
+    .gfx_update  = sm501_update_display,
+};
+
 void sm501_init(MemoryRegion *address_space_mem, uint32_t base,
                 uint32_t local_mem_bytes, qemu_irq irq, CharDriverState *chr)
 {
@@ -1445,6 +1449,5 @@ void sm501_init(MemoryRegion *address_space_mem, uint32_t base,
     }
 
     /* create qemu graphic console */
-    s->con = graphic_console_init(sm501_update_display, NULL,
-                                  NULL, s);
+    s->con = graphic_console_init(&sm501_ops, s);
 }