qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/6] qdev: introduce a helper function which trigger


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH 3/6] qdev: introduce a helper function which triggers reset from a given device.
Date: Thu, 2 Sep 2010 18:25:06 +0900

introduce a helper function which triggers reset on device tree
from a given device.

Signed-off-by: Isaku Yamahata <address@hidden>
---
 hw/qdev-core.h |    1 +
 hw/qdev.c      |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/qdev-core.h b/hw/qdev-core.h
index 49ac87a..20ebe1f 100644
--- a/hw/qdev-core.h
+++ b/hw/qdev-core.h
@@ -195,6 +195,7 @@ int qdev_walk_children(DeviceState *dev, qdev_walkerfn 
*devfn,
 DeviceState *qbus_find_child_dev(BusState *bus, const char *id);
 BusState *qbus_find_child_bus(BusState *bus, const char *id);
 
+void qdev_reset_all(DeviceState *dev);
 void qbus_reset_all(BusState *bus);
 void qbus_realize_all(BusState *bus);
 
diff --git a/hw/qdev.c b/hw/qdev.c
index 9300d7f..191dfac 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -174,6 +174,11 @@ static int qbus_reset_one(BusState *bus, void *opaque)
     return 0;
 }
 
+void qdev_reset_all(DeviceState *dev)
+{
+    qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL);
+}
+
 void qbus_reset_all(BusState *bus)
 {
     qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
-- 
1.7.1.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]