From 7f23f812c49da6d6fe03bcd4bc2d07341e93db11 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 16 Sep 2009 13:40:27 +0300 Subject: 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 Signed-off-by: Anthony Liguori --- hw/qdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/qdev.h') diff --git a/hw/qdev.h b/hw/qdev.h index 7da78378bf..893ae925ca 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -115,6 +115,7 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name); typedef int (*qdev_initfn)(DeviceState *dev, DeviceInfo *info); typedef int (*qdev_event)(DeviceState *dev); +typedef void (*qdev_resetfn)(DeviceState *dev); struct DeviceInfo { const char *name; @@ -125,7 +126,7 @@ struct DeviceInfo { int no_user; /* callbacks */ - QEMUResetHandler *reset; + qdev_resetfn reset; /* device state */ const VMStateDescription *vmsd; -- cgit v1.2.3