aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-08-31 16:07:22 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-09 14:55:14 -0500
commit957c9db562bb70ef18a4d803c9d789708a61e929 (patch)
treee439ccac8c79d95a8dd99ae12951665208f3fbc8
parente9b43ea36a8239b8ce01e2a6df450cc736d629cc (diff)
cirrus_vga: make cirrus_read_hidden_dac() return its result
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/cirrus_vga.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index b8a3ea27c2..b2b6e8593c 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -1399,13 +1399,13 @@ cirrus_hook_write_sr(CirrusVGAState * s, unsigned reg_index, int reg_value)
*
***************************************/
-static void cirrus_read_hidden_dac(CirrusVGAState * s, int *reg_value)
+static int cirrus_read_hidden_dac(CirrusVGAState * s)
{
- *reg_value = 0xff;
if (++s->cirrus_hidden_dac_lockindex == 5) {
- *reg_value = s->cirrus_hidden_dac_data;
- s->cirrus_hidden_dac_lockindex = 0;
+ s->cirrus_hidden_dac_lockindex = 0;
+ return s->cirrus_hidden_dac_data;
}
+ return 0xff;
}
static void cirrus_write_hidden_dac(CirrusVGAState * s, int reg_value)
@@ -2695,7 +2695,7 @@ static uint32_t cirrus_vga_ioport_read(void *opaque, uint32_t addr)
#endif
break;
case 0x3c6:
- cirrus_read_hidden_dac(c, &val);
+ val = cirrus_read_hidden_dac(c);
break;
case 0x3c7:
val = s->dac_state;