diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-29 07:47:01 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-10 18:49:24 +0100 |
commit | 118b46a461fb42ecbb13cbd0ca71167b128b050e (patch) | |
tree | 3098aa5b58fd5c0f13558dc9cd6aecd30c514f44 | |
parent | 4cc055039fc1c1ab18f172fa791aa3d48d7d20aa (diff) | |
download | qemu-118b46a461fb42ecbb13cbd0ca71167b128b050e.zip qemu-118b46a461fb42ecbb13cbd0ca71167b128b050e.tar.gz qemu-118b46a461fb42ecbb13cbd0ca71167b128b050e.tar.bz2 |
clock: treat outputs and inputs the same in NamedClockList
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/core/qdev-clock.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/core/qdev-clock.c b/hw/core/qdev-clock.c index ca65685..2f9d6cb 100644 --- a/hw/core/qdev-clock.c +++ b/hw/core/qdev-clock.c @@ -48,14 +48,6 @@ static NamedClockList *qdev_init_clocklist(DeviceState *dev, const char *name, if (clk == NULL) { clk = CLOCK(object_new(TYPE_CLOCK)); object_property_add_child(OBJECT(dev), name, OBJECT(clk)); - if (output) { - /* - * Remove object_new()'s initial reference. - * Note that for inputs, the reference created by object_new() - * will be deleted in qdev_finalize_clocklist(). - */ - object_unref(OBJECT(clk)); - } } else { object_property_add_link(OBJECT(dev), name, object_get_typename(OBJECT(clk)), @@ -84,7 +76,7 @@ void qdev_finalize_clocklist(DeviceState *dev) QLIST_FOREACH_SAFE(ncl, &dev->clocks, node, ncl_next) { QLIST_REMOVE(ncl, node); - if (!ncl->output && !ncl->alias) { + if (!ncl->alias) { /* * We kept a reference on the input clock to ensure it lives up to * this point; it is used by the monitor to show the frequency. |