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>
This commit is contained in:
Peter Crosthwaite 2014-09-25 22:23:09 -07:00 committed by Paolo Bonzini
parent 15942b6569
commit aef0869e8e
1 changed files with 1 additions and 2 deletions

View 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));