From patchwork Fri Dec 24 03:14:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 76585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 98517B7093 for ; Fri, 24 Dec 2010 14:27:00 +1100 (EST) Received: from localhost ([127.0.0.1]:51382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVyII-0006cE-5o for incoming@patchwork.ozlabs.org; Thu, 23 Dec 2010 22:26:14 -0500 Received: from [140.186.70.92] (port=55475 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVy6n-0008TM-MM for qemu-devel@nongnu.org; Thu, 23 Dec 2010 22:14:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVy6m-0001pA-4D for qemu-devel@nongnu.org; Thu, 23 Dec 2010 22:14:21 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:41202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVy6l-0001og-Om for qemu-devel@nongnu.org; Thu, 23 Dec 2010 22:14:20 -0500 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 3ED5828045; Fri, 24 Dec 2010 12:14:17 +0900 (JST) Received: (nullmailer pid 8324 invoked by uid 1000); Fri, 24 Dec 2010 03:14:16 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Fri, 24 Dec 2010 12:14:12 +0900 Message-Id: <70fb85912df0fea0c46f8090244b944d40d68a2f.1293160345.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yamahata@valinux.co.jp, mst@redhat.com Subject: [Qemu-devel] [PATCH v11 1/5] qdev: export qdev_find_recursive() for later use X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch exports qdev_find_recursive() for later use. Signed-off-by: Isaku Yamahata --- hw/qdev.c | 2 +- hw/qdev.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 4747c67..31eb464 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 5f5a319..2be775f 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);