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>
This commit is contained in:
Gerd Hoffmann 2013-03-13 14:04:18 +01:00
parent 27be55872d
commit 380cd056ec
26 changed files with 155 additions and 104 deletions

View file

@ -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);
}