diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-08-28 16:02:32 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-06 18:41:32 +0400 |
commit | 3cad405babb461e3c70782c51415f0b64bc7540d (patch) | |
tree | 97b2207f7ce1aec97358abae4cd14984d18d5dab /hw/core/qdev.c | |
parent | 107b59698f79b323c4d111c46eb9e3db6f9d258b (diff) |
vmstate: replace DeviceState with VMStateIf
Replace DeviceState dependency with VMStateIf on vmstate API.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r-- | hw/core/qdev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 1a98812be2..501228ba08 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -889,7 +889,8 @@ static void device_set_realized(Object *obj, bool value, Error **errp) dev->canonical_path = object_get_canonical_path(OBJECT(dev)); if (qdev_get_vmsd(dev)) { - if (vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev), dev, + if (vmstate_register_with_alias_id(VMSTATE_IF(dev), + -1, qdev_get_vmsd(dev), dev, dev->instance_id_alias, dev->alias_required_for_version, &local_err) < 0) { @@ -923,7 +924,7 @@ static void device_set_realized(Object *obj, bool value, Error **errp) local_err ? NULL : &local_err); } if (qdev_get_vmsd(dev)) { - vmstate_unregister(dev, qdev_get_vmsd(dev), dev); + vmstate_unregister(VMSTATE_IF(dev), qdev_get_vmsd(dev), dev); } if (dc->unrealize) { dc->unrealize(dev, local_err ? NULL : &local_err); @@ -947,7 +948,7 @@ child_realize_fail: } if (qdev_get_vmsd(dev)) { - vmstate_unregister(dev, qdev_get_vmsd(dev), dev); + vmstate_unregister(VMSTATE_IF(dev), qdev_get_vmsd(dev), dev); } post_realize_fail: |