summaryrefslogtreecommitdiffstats
path: root/hw/tcx.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin2009-09-16 12:40:27 +0200
committerAnthony Liguori2009-10-05 16:32:50 +0200
commit7f23f812c49da6d6fe03bcd4bc2d07341e93db11 (patch)
tree68577e6d08641474f5dd3ea919e343b68eb14fe1 /hw/tcx.c
parentserial: convert isa to qdev (diff)
downloadqemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.tar.gz
qemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.tar.xz
qemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.zip
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 3816c531e2..b177cc9689 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;
}