summaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-07-21 08:32:07 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-11-11 17:21:39 +0100
commitff8de0757fc13407c81f002e936031ddc13057e4 (patch)
treed4d3123c6e0fc3001123af6a943e2fce2af5a9fa /hw/core
parent81a93ee64d78a1933998ff1b95f06b6d67db46fd (diff)
qdev: provide qdev_reset_all_fn()
For TYPE_DEVICE, the dc->reset() function is not called on system resets yet. Until that is changed, we have to manually register a reset handler. Let's provide qdev_reset_all_fn(), that can directly be used - just like the reset handler that is already available for qbus. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/qdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 4ab04aa31e..b3ad467754 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -325,6 +325,11 @@ void qdev_reset_all(DeviceState *dev)
qdev_walk_children(dev, NULL, NULL, qdev_reset_one, qbus_reset_one, NULL);
}
+void qdev_reset_all_fn(void *opaque)
+{
+ qdev_reset_all(DEVICE(opaque));
+}
+
void qbus_reset_all(BusState *bus)
{
qbus_walk_children(bus, NULL, NULL, qdev_reset_one, qbus_reset_one, NULL);