From b2a5e761c6fcf0b03734f4d911c02272edbe6ad1 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 8 Aug 2011 16:09:01 +0300 Subject: vga: simplify vga window mmio access functions Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. We have to keep vga_mem_{read,write}b() since they're used by cirrus. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori --- hw/cirrus_vga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/cirrus_vga.c') diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 5ded1ff..2a9bd25 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -1966,7 +1966,7 @@ static uint64_t cirrus_vga_mem_read(void *opaque, uint32_t val; if ((s->vga.sr[0x07] & 0x01) == 0) { - return vga_mem_readb(s, addr); + return vga_mem_readb(&s->vga, addr); } if (addr < 0x10000) { @@ -2011,7 +2011,7 @@ static void cirrus_vga_mem_write(void *opaque, unsigned mode; if ((s->vga.sr[0x07] & 0x01) == 0) { - vga_mem_writeb(s, addr, mem_value); + vga_mem_writeb(&s->vga, addr, mem_value); return; } -- cgit v1.1