pca955x_initfn() passes @type "bool" to object_property_add().  The
properties are actually string-typed: pca955x_get_led() and
pca955x_set_led() use visit_type_str().  Pass "str" instead.

Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get")
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Glenn Miles <[email protected]>
Message-ID: <[email protected]>
---
 hw/gpio/pca9552.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
index 7e5fda4980..07ef0fb20b 100644
--- a/hw/gpio/pca9552.c
+++ b/hw/gpio/pca9552.c
@@ -567,7 +567,7 @@ static void pca955x_initfn(Object *obj)
         if (k->has_led_support) {
             /* LED variant: expose the LED selector state as led%d. */
             name = g_strdup_printf("led%d", ix);
-            object_property_add(obj, name, "bool", NULL,
+            object_property_add(obj, name, "str", NULL,
                                 pca955x_get_led, pca955x_set_led, NULL, NULL);
         } else {
             /* GPIO variant: expose the pin logic level as pin%d. */
-- 
2.55.0


Reply via email to