mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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:
parent
ac0be99800
commit
7f23f812c4
4 changed files with 19 additions and 13 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue