Skip to content

Commit b37e56f

Browse files
author
Andre Beckus
committed
Fix procedure calls to create device properties
1 parent e54cab6 commit b37e56f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hw/gpio/stm32_afio.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ static Property stm32_afio_properties[] = {
255255
static void add_gpio_link(Stm32Afio *s, int gpio_index, const char *link_name)
256256
{
257257
object_property_add_link(OBJECT(s), link_name, TYPE_STM32_GPIO,
258-
(Object **)&s->gpio[gpio_index], NULL);
258+
(Object **)&s->gpio[gpio_index],
259+
object_property_allow_set_link,
260+
OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
259261
}
260262

261263
static void stm32_afio_instance_init(Object *obj)
@@ -271,7 +273,9 @@ static void stm32_afio_instance_init(Object *obj)
271273
add_gpio_link(s, 6, "gpio[g]");
272274

273275
object_property_add_link(obj, "exti", TYPE_STM32_EXTI,
274-
(Object **)&s->exti, NULL);
276+
(Object **)&s->exti,
277+
object_property_allow_set_link,
278+
OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
275279

276280
}
277281

0 commit comments

Comments
 (0)