From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xilzu-0004aU-DX for qemu-devel@nongnu.org; Mon, 27 Oct 2014 11:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xilzp-0001g6-Cy for qemu-devel@nongnu.org; Mon, 27 Oct 2014 11:14:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xilzp-0001fw-4a for qemu-devel@nongnu.org; Mon, 27 Oct 2014 11:14:13 -0400 From: Paolo Bonzini Date: Mon, 27 Oct 2014 16:13:29 +0100 Message-Id: <1414422825-6166-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1414422825-6166-1-git-send-email-pbonzini@redhat.com> References: <1414422825-6166-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 12/28] qdev: gpio: Remove qdev_init_gpio_out x1 restriction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite From: Peter Crosthwaite Previously this was restricted to a single call per-dev/per-name. With the conversion of the GPIO output state to QOM the implementation can now handle repeated calls. Remove the restriction. Reviewed-by: Alexander Graf Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- hw/core/qdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index efbaa99..31014e8 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -404,8 +404,7 @@ void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, char *propname = g_strdup_printf("%s[*]", name ? name : "unnamed-gpio-out"); assert(gpio_list->num_in == 0 || !name); - assert(gpio_list->num_out == 0); - gpio_list->num_out = n; + gpio_list->num_out += n; for (i = 0; i < n; ++i) { memset(&pins[i], 0, sizeof(*pins)); -- 1.8.3.1