From: Isaku Yamahata Date: Fri, 24 Dec 2010 03:14:12 +0000 (+0900) Subject: qdev: export qdev_find_recursive() for later use X-Git-Tag: v0.14.0-rc0~226^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2ee6b4fcb3e2f2f5d60211ce0f734c61f8e0e30;p=thirdparty%2Fqemu.git qdev: export qdev_find_recursive() for later use This patch exports qdev_find_recursive() for later use. Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/qdev.c b/hw/qdev.c index 4747c6768c8..31eb464f23d 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -548,7 +548,7 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name, return NULL; } -static DeviceState *qdev_find_recursive(BusState *bus, const char *id) +DeviceState *qdev_find_recursive(BusState *bus, const char *id) { DeviceState *dev, *ret; BusState *child; diff --git a/hw/qdev.h b/hw/qdev.h index 5f5a319da47..2be775f9e8e 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -183,6 +183,8 @@ BusState *qdev_get_parent_bus(DeviceState *dev); /*** BUS API. ***/ +DeviceState *qdev_find_recursive(BusState *bus, const char *id); + /* Returns 0 to walk children, > 0 to skip walk, < 0 to terminate walk. */ typedef int (qbus_walkerfn)(BusState *bus, void *opaque); typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque);