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>
This commit is contained in:
Michael S. Tsirkin 2009-09-16 13:40:27 +03:00 committed by Anthony Liguori
parent ac0be99800
commit 7f23f812c4
4 changed files with 19 additions and 13 deletions

View file

@ -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;