]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qdev: gpio: Remove qdev_init_gpio_out x1 restriction
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Fri, 26 Sep 2014 05:23:09 +0000 (22:23 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Oct 2014 14:41:26 +0000 (16:41 +0200)
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>
hw/core/qdev.c

index efbaa991177d2f30c370e74ca8b3187724bcf272..31014e8769bbe26aee2c0a8117bd2a92d5f2ef6b 100644 (file)
@@ -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));