summaryrefslogtreecommitdiffstats
path: root/hw/qdev.h
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/qdev.h
parentac0be998009257f0368e25470bac4e85b694ceaf (diff)
downloadhqemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.zip
hqemu-7f23f812c49da6d6fe03bcd4bc2d07341e93db11.tar.gz
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/qdev.h')
-rw-r--r--hw/qdev.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 7da7837..893ae92 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;
OpenPOWER on IntegriCloud