| Message ID | 20261105080310.1656968-3-armbru@redhat.com |
|---|---|
| State | New |
| Headers | show |
| Series | qom/qdev: associate properties with QAPI types fixups | expand |
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. */
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 <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> --- hw/gpio/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)