@@ -23,6 +23,7 @@
#include "hw/core/irq.h"
#include "migration/vmstate.h"
#include "qapi/error.h"
+#include "qapi/qapi-builtin-type-infos.h"
#include "qapi/visitor.h"
#include "trace.h"
#include "qom/object.h"
@@ -567,12 +568,12 @@ 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, "str", NULL,
+ object_property_add(obj, name, "str", &str_type_info,
pca955x_get_led, pca955x_set_led, NULL, NULL);
} else {
/* GPIO variant: expose the pin logic level as pin%d. */
name = g_strdup_printf("pin%d", ix);
- object_property_add(obj, name, "str", NULL,
+ object_property_add(obj, name, "str", &str_type_info,
pca955x_get_pin, pca955x_set_pin, NULL, NULL);
}
g_free(name);
@@ -16,6 +16,7 @@
#include "hw/core/irq.h"
#include "migration/vmstate.h"
#include "qapi/error.h"
+#include "qapi/qapi-builtin-type-infos.h"
#include "qapi/visitor.h"
#include "trace.h"
#include "qom/object.h"
@@ -280,8 +281,8 @@ static void pca9554_initfn(Object *obj)
char *name;
name = g_strdup_printf("pin%d", pin);
- object_property_add(obj, name, "str", NULL, pca9554_get_pin,
- pca9554_set_pin,
+ object_property_add(obj, name, "str", &str_type_info,
+ pca9554_get_pin, pca9554_set_pin,
NULL, NULL);
g_free(name);
}
When we recently updated PropertyInfo to set @qapi_type, we missed a few. Update them now. Fixes: 04dc2fe4d463 ("hw: convert device-local PropertyInfo definitions to use qapi_type") Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- hw/gpio/pca9552.c | 5 +++-- hw/gpio/pca9554.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)