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/omap_lcdc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hw/display/omap_lcdc.c') diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c index f76f6135d6..e4a55958fa 100644 --- a/hw/display/omap_lcdc.c +++ b/hw/display/omap_lcdc.c @@ -384,6 +384,11 @@ void omap_lcdc_reset(struct omap_lcd_panel_s *s) s->ctrl = 0; } +static const GraphicHwOps omap_ops = { + .invalidate = omap_invalidate_display, + .gfx_update = omap_update_display, +}; + struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem, hwaddr base, qemu_irq irq, @@ -401,9 +406,7 @@ struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem, memory_region_init_io(&s->iomem, &omap_lcdc_ops, s, "omap.lcdc", 0x100); memory_region_add_subregion(sysmem, base, &s->iomem); - s->con = graphic_console_init(omap_update_display, - omap_invalidate_display, - NULL, s); + s->con = graphic_console_init(&omap_ops, s); return s; } -- cgit 1.4.1