mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 22:42:13 -06:00
qdev: Remove opts member
It is no longer used. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250104-reuse-v18-14-c349eafd8673@daynix.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
a7a3784128
commit
ad1ea5ffa1
3 changed files with 7 additions and 10 deletions
|
@ -691,7 +691,6 @@ static void device_finalize(Object *obj)
|
|||
dev->canonical_path = NULL;
|
||||
}
|
||||
|
||||
qobject_unref(dev->opts);
|
||||
g_free(dev->id);
|
||||
}
|
||||
|
||||
|
|
|
@ -248,10 +248,6 @@ struct DeviceState {
|
|||
* @pending_deleted_expires_ms: optional timeout for deletion events
|
||||
*/
|
||||
int64_t pending_deleted_expires_ms;
|
||||
/**
|
||||
* @opts: QDict of options for the device
|
||||
*/
|
||||
QDict *opts;
|
||||
/**
|
||||
* @hotplugged: was device added after PHASE_MACHINE_READY?
|
||||
*/
|
||||
|
|
|
@ -631,6 +631,7 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
|
|||
char *id;
|
||||
DeviceState *dev = NULL;
|
||||
BusState *bus = NULL;
|
||||
QDict *properties;
|
||||
|
||||
driver = qdict_get_try_str(opts, "driver");
|
||||
if (!driver) {
|
||||
|
@ -712,13 +713,14 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
|
|||
}
|
||||
|
||||
/* set properties */
|
||||
dev->opts = qdict_clone_shallow(opts);
|
||||
qdict_del(dev->opts, "driver");
|
||||
qdict_del(dev->opts, "bus");
|
||||
qdict_del(dev->opts, "id");
|
||||
properties = qdict_clone_shallow(opts);
|
||||
qdict_del(properties, "driver");
|
||||
qdict_del(properties, "bus");
|
||||
qdict_del(properties, "id");
|
||||
|
||||
object_set_properties_from_keyval(&dev->parent_obj, dev->opts, from_json,
|
||||
object_set_properties_from_keyval(&dev->parent_obj, properties, from_json,
|
||||
errp);
|
||||
qobject_unref(properties);
|
||||
if (*errp) {
|
||||
goto err_del_dev;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue