From 380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 13 Mar 2013 14:04:18 +0100 Subject: 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 --- hw/display/g364fb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hw/display/g364fb.c') diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index b70fe8afa4..03810e9717 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -475,13 +475,16 @@ static const VMStateDescription vmstate_g364fb = { } }; +static const GraphicHwOps g364fb_ops = { + .invalidate = g364fb_invalidate_display, + .gfx_update = g364fb_update_display, +}; + static void g364fb_init(DeviceState *dev, G364State *s) { s->vram = g_malloc0(s->vram_size); - s->con = graphic_console_init(g364fb_update_display, - g364fb_invalidate_display, - NULL, s); + s->con = graphic_console_init(&g364fb_ops, s); memory_region_init_io(&s->mem_ctrl, &g364fb_ctrl_ops, s, "ctrl", 0x180000); memory_region_init_ram_ptr(&s->mem_vram, "vram", -- cgit v1.2.1