From patchwork Thu Jun 29 14:07:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 782309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wz1qY1VN1z9s0g for ; Fri, 30 Jun 2017 00:14:01 +1000 (AEST) Received: from localhost ([::1]:39619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQaCk-0003Of-ET for incoming@patchwork.ozlabs.org; Thu, 29 Jun 2017 10:13:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQa6c-0006BY-Pj for qemu-devel@nongnu.org; Thu, 29 Jun 2017 10:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQa6b-000708-L7 for qemu-devel@nongnu.org; Thu, 29 Jun 2017 10:07:38 -0400 Received: from chuckie.co.uk ([82.165.15.123]:60701 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dQa6b-0006zn-E4 for qemu-devel@nongnu.org; Thu, 29 Jun 2017 10:07:37 -0400 Received: from host109-148-71-180.range109-148.btcentralplus.com ([109.148.71.180] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dQa6Z-000103-AD; Thu, 29 Jun 2017 15:07:36 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, lersek@redhat.com, somlo@cmu.edu, ehabkost@redhat.com, mst@redhat.com, pbonzini@redhat.com, rjones@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Date: Thu, 29 Jun 2017 15:07:17 +0100 Message-Id: <1498745240-30658-4-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1498745240-30658-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1498745240-30658-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 109.148.71.180 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCHv7 3/6] fw_cfg: switch fw_cfg_find() to locate the fw_cfg device by type rather than path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This will enable the fw_cfg device to be placed anywhere within the QOM tree regardless of its machine location. Signed-off-by: Mark Cave-Ayland --- hw/nvram/fw_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 99bdbc2..0fe7404 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1017,7 +1017,7 @@ FWCfgState *fw_cfg_init_mem(hwaddr ctl_addr, hwaddr data_addr) FWCfgState *fw_cfg_find(void) { - return FW_CFG(object_resolve_path(FW_CFG_PATH, NULL)); + return FW_CFG(object_resolve_path_type("", TYPE_FW_CFG, NULL)); } static void fw_cfg_class_init(ObjectClass *klass, void *data)