aboutsummaryrefslogtreecommitdiff
path: root/hw/tcx.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-09-16 13:40:27 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:50 -0500
commit7f23f812c49da6d6fe03bcd4bc2d07341e93db11 (patch)
tree68577e6d08641474f5dd3ea919e343b68eb14fe1 /hw/tcx.c
parentac0be998009257f0368e25470bac4e85b694ceaf (diff)
downloadqemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.zip
qemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.tar.gz
qemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.tar.bz2
qemu/qdev: type safety in reset handler
Add type safety to qdev reset handlers, by declaring them as DeviceState * rather than void *. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/tcx.c')
-rw-r--r--hw/tcx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/tcx.c b/hw/tcx.c
index 3816c53..b177cc9 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -411,9 +411,9 @@ static const VMStateDescription vmstate_tcx = {
}
};
-static void tcx_reset(void *opaque)
+static void tcx_reset(DeviceState *d)
{
- TCXState *s = opaque;
+ TCXState *s = container_of(d, TCXState, busdev.qdev);
/* Initialize palette */
memset(s->r, 0, 256);
@@ -560,7 +560,7 @@ static int tcx_init1(SysBusDevice *dev)
tcx_screen_dump, NULL, s);
}
- tcx_reset(s);
+ tcx_reset(&s->busdev.qdev);
qemu_console_resize(s->ds, s->width, s->height);
return 0;
}