diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-24 18:42:45 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:46:59 -0500 |
commit | 03a3e7ba5a04a7704f5fa11aff9d491dcbb9a83e (patch) | |
tree | 6f05dd6acdd9b2970aac7567ecda2b571c507285 | |
parent | 63124a0d88750fd0e7872e13e7873ad4dc0cbd86 (diff) |
Introduce vga_common_reset() to be able to typcheck vga_reset()
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/cirrus_vga.c | 2 | ||||
-rw-r--r-- | hw/vga.c | 10 | ||||
-rw-r--r-- | hw/vga_int.h | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 6e9cbd412d..b2bf0d9659 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3125,7 +3125,7 @@ static void cirrus_reset(void *opaque) { CirrusVGAState *s = opaque; - vga_reset(s); + vga_common_reset(&s->vga); unmap_linear_vram(s); s->vga.sr[0x06] = 0x0f; if (s->device_id == CIRRUS_ID_CLGD5446) { @@ -1873,10 +1873,8 @@ static void vga_invalidate_display(void *opaque) s->full_update = 1; } -void vga_reset(void *opaque) +void vga_common_reset(VGACommonState *s) { - VGAState *s = (VGAState *) opaque; - s->lfb_addr = 0; s->lfb_end = 0; s->map_addr = 0; @@ -1942,6 +1940,12 @@ void vga_reset(void *opaque) } } +static void vga_reset(void *opaque) +{ + VGAState *s = (VGAState *) opaque; + vga_common_reset(s); +} + #define TEXTMODE_X(x) ((x) % width) #define TEXTMODE_Y(x) ((x) / width) #define VMEM2CHTYPE(v) ((v & 0xff0007ff) | \ diff --git a/hw/vga_int.h b/hw/vga_int.h index eb2d6ea94a..bb288727c2 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -192,7 +192,7 @@ static inline int c6_to_8(int v) void vga_common_init(VGAState *s, int vga_ram_size); void vga_init(VGAState *s); -void vga_reset(void *s); +void vga_common_reset(VGACommonState *s); void vga_dirty_log_start(VGAState *s); |