mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
clock: treat outputs and inputs the same in NamedClockList
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
4cc055039f
commit
118b46a461
1 changed files with 1 additions and 9 deletions
|
@ -48,14 +48,6 @@ static NamedClockList *qdev_init_clocklist(DeviceState *dev, const char *name,
|
||||||
if (clk == NULL) {
|
if (clk == NULL) {
|
||||||
clk = CLOCK(object_new(TYPE_CLOCK));
|
clk = CLOCK(object_new(TYPE_CLOCK));
|
||||||
object_property_add_child(OBJECT(dev), name, OBJECT(clk));
|
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 {
|
} else {
|
||||||
object_property_add_link(OBJECT(dev), name,
|
object_property_add_link(OBJECT(dev), name,
|
||||||
object_get_typename(OBJECT(clk)),
|
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_FOREACH_SAFE(ncl, &dev->clocks, node, ncl_next) {
|
||||||
QLIST_REMOVE(ncl, node);
|
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
|
* 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.
|
* this point; it is used by the monitor to show the frequency.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue