qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v1 12/16] qdev: gpio: Remove qdev_init_gpio_out x1 r


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH v1 12/16] qdev: gpio: Remove qdev_init_gpio_out x1 restriction
Date: Sun, 3 Aug 2014 18:58:04 -0700

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.

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 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 77b0b09..bf2c227 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -366,8 +366,7 @@ void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq 
*pins,
     NamedGPIOList *gpio_list = qdev_get_named_gpio_list(dev, name);
 
     assert(gpio_list->num_in == 0 || !name);
-    assert(gpio_list->num_out == 0);
-    gpio_list->num_out = n;
+    gpio_list->num_out += n;
 
     char *propname = g_strdup_printf("%s[*]", name ? name : 
"unnamed-gpio-out");
     for (i = 0; i < n; ++i) {
-- 
2.0.1.1.gfbfc394




reply via email to

[Prev in Thread] Current Thread [Next in Thread]