diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2009-09-16 13:40:27 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:50 -0500 |
commit | 7f23f812c49da6d6fe03bcd4bc2d07341e93db11 (patch) | |
tree | 68577e6d08641474f5dd3ea919e343b68eb14fe1 /hw/qdev.h | |
parent | ac0be998009257f0368e25470bac4e85b694ceaf (diff) |
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |