From patchwork Tue Sep 18 02:11:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peter A. G. Crosthwaite" X-Patchwork-Id: 184582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7737B2C008A for ; Tue, 18 Sep 2012 12:12:14 +1000 (EST) Received: from localhost ([::1]:47885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDnIK-00040y-EX for incoming@patchwork.ozlabs.org; Mon, 17 Sep 2012 22:12:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDnI6-0003t4-BE for qemu-devel@nongnu.org; Mon, 17 Sep 2012 22:11:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDnI5-0004Ns-4O for qemu-devel@nongnu.org; Mon, 17 Sep 2012 22:11:58 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:60268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDnI5-0004LZ-08 for qemu-devel@nongnu.org; Mon, 17 Sep 2012 22:11:57 -0400 Received: by mail-oa0-f45.google.com with SMTP id n12so5201914oag.4 for ; Mon, 17 Sep 2012 19:11:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=05x0sUn+FLbV4TcxhtSt3UOMXwhruRhAXE9Hgpv2fNA=; b=GOZVoOzr5bs1/yVRxV03DwzfoYy9pBLNs7UcR1o37bvoz1xJbMLVfXWFcxmI9lnay1 FLvW8uvvVio16NEY6oGDlIfG9oFmgBTXhkSAa5r4Ut0y9kCwa/t1iB/vPxmEEgnyXXBH H6hPDl/HgZXkvS+VDvL2rF/HhSFdRA4Z7e/S6EKDu6s1XOgn7xA63vJBRwCpKa4QffJr gBTwxzXtjNpRryq4h8uJaWZ/FyyolsrFajJbSVLFGg7h1WO8F7BEKdlZEZRMu05SUK+J eGrYBSyP9w+TwL7TWNsnHf1Ojj9b8xaXSpvSocC0Q0AhFR2EQ4ninxVcqkDkuF5YUs1D qyrg== Received: by 10.60.22.196 with SMTP id g4mr13895614oef.95.1347934316800; Mon, 17 Sep 2012 19:11:56 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id x1sm10376037oef.8.2012.09.17.19.11.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 19:11:56 -0700 (PDT) From: "Peter A. G. Crosthwaite" To: qemu-devel@nongnu.org, paul@codesourcery.com, edgar.iglesias@gmail.com, peter.maydell@linaro.org, stefanha@gmail.com Date: Tue, 18 Sep 2012 12:11:00 +1000 Message-Id: <82bc82fd9213239367390b8b5614d0890d2c68ed.1347932427.git.peter.crosthwaite@petalogix.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnkf6mTOzmP3HBzjAKGE41L6r81MoQnTd+rdQ6r4SgMvUgABd3WFDy/9yH7aOfXGxjdfPKV X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.219.45 Cc: "Peter A. G. Crosthwaite" , i.mitsyanko@samsung.com Subject: [Qemu-devel] [PATCH v6 03/13] ssi: Added create_slave_no_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org Slave creation function that can be used to create an SSI slave without qdev_init() being called. This give machine models a chance to set properties. Signed-off-by: Peter A. G. Crosthwaite --- hw/ssi.c | 9 +++++++-- hw/ssi.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ssi.c b/hw/ssi.c index 2e4f2fe..c47419d 100644 --- a/hw/ssi.c +++ b/hw/ssi.c @@ -86,10 +86,15 @@ static TypeInfo ssi_slave_info = { .abstract = true, }; +DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name) +{ + return qdev_create(&bus->qbus, name); +} + DeviceState *ssi_create_slave(SSIBus *bus, const char *name) { - DeviceState *dev; - dev = qdev_create(&bus->qbus, name); + DeviceState *dev = ssi_create_slave_no_init(bus, name); + qdev_init_nofail(dev); return dev; } diff --git a/hw/ssi.h b/hw/ssi.h index 65b159d..2bde9f5 100644 --- a/hw/ssi.h +++ b/hw/ssi.h @@ -76,6 +76,7 @@ extern const VMStateDescription vmstate_ssi_slave; } DeviceState *ssi_create_slave(SSIBus *bus, const char *name); +DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name); /* Master interface. */ SSIBus *ssi_create_bus(DeviceState *parent, const char *name);