From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJvTg-0002e7-Rz for qemu-devel@nongnu.org; Thu, 04 Oct 2012 20:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJvTf-0001iB-7o for qemu-devel@nongnu.org; Thu, 04 Oct 2012 20:09:16 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:42758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJvTf-0001gF-1e for qemu-devel@nongnu.org; Thu, 04 Oct 2012 20:09:15 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so1027227pad.4 for ; Thu, 04 Oct 2012 17:09:14 -0700 (PDT) From: Peter Crosthwaite Date: Fri, 5 Oct 2012 10:08:48 +1000 Message-Id: <1349395739-26502-4-git-send-email-peter.crosthwaite@xilinx.com> In-Reply-To: <1349395739-26502-1-git-send-email-peter.crosthwaite@xilinx.com> References: <1349395739-26502-1-git-send-email-peter.crosthwaite@xilinx.com> Subject: [Qemu-devel] [PATCH 03/14] ssi: Added create_slave_no_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, edgar.iglesias@gmail.com, blauwirbel@gmail.com, aliguori@us.ibm.com Cc: peter.crosthwaite@petalogix.com From: Peter A. G. Crosthwaite 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); -- 1.7.0.4