aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-09-25 22:23:09 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-23 16:41:26 +0200
commitaef0869e8ed83ec201488020a9a1cc44d85d72bf (patch)
tree6e9bfb340cd162933a5aa08df786bc03d1a59e41
parent15942b65697c7016a8ca836ecbfd9777d959187c (diff)
qdev: gpio: Remove qdev_init_gpio_out x1 restriction
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 <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/core/qdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index efbaa99117..31014e8769 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));