diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-04 11:36:01 -0600 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:46 -0600 |
| commit | 94afdadcb3ab71f5123f719d74065c6f4cc837ea (patch) | |
| tree | 747906b65b821ed33449a231b9b68ace8ac06374 /hw/qdev.h | |
| parent | f79f2bfc6aae76718652f0b3e15a849f7b58104a (diff) | |
| download | focaccia-qemu-94afdadcb3ab71f5123f719d74065c6f4cc837ea.tar.gz focaccia-qemu-94afdadcb3ab71f5123f719d74065c6f4cc837ea.zip | |
qdev: use a wrapper to access reset and promote reset to a class method
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
| -rw-r--r-- | hw/qdev.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h index a6af632be9..f3c92199f0 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -75,6 +75,7 @@ typedef struct DeviceProperty typedef struct DeviceClass { ObjectClass parent_class; DeviceInfo *info; + void (*reset)(DeviceState *dev); } DeviceClass; /* This structure should not be accessed directly. We declare it here @@ -647,4 +648,11 @@ char *qdev_get_type(DeviceState *dev, Error **errp); */ void qdev_machine_init(void); +/** + * @device_reset + * + * Reset a single device (by calling the reset method). + */ +void device_reset(DeviceState *dev); + #endif |