qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 12/14] qdev: gpio: Remove qdev_init_gpio_out x1 r


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH v2 12/14] qdev: gpio: Remove qdev_init_gpio_out x1 restriction
Date: Thu, 14 Aug 2014 22:35:57 -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 dbc4aad..2b96b5a 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -367,8 +367,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));
-- 
2.0.1.1.gfbfc394




reply via email to

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