mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
qdev: use a wrapper to access reset and promote reset to a class method
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f79f2bfc6a
commit
94afdadcb3
4 changed files with 27 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue