diff mbox series

[16/19] hw/nios2: Set QDev properties using QDev API

Message ID 20230203180914.49112-17-philmd@linaro.org
State New
Headers show
Series hw: Set QDev properties using QDev API (part 1/3) | expand

Commit Message

Philippe Mathieu-Daudé Feb. 3, 2023, 6:09 p.m. UTC
No need to use the low-level QOM API when an object
inherits from QDev. Directly use the QDev API to set
its properties.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/nios2/10m50_devboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c
index 91383fb097..01f6d5c84c 100644
--- a/hw/nios2/10m50_devboard.c
+++ b/hw/nios2/10m50_devboard.c
@@ -102,7 +102,7 @@  static void nios2_10m50_ghrd_init(MachineState *machine)
         MemoryRegion *dev_mr;
         qemu_irq cpu_irq;
 
-        object_property_set_link(OBJECT(dev), "cpu", OBJECT(cpu), &error_fatal);
+        qdev_prop_set_link(dev, "cpu", OBJECT(cpu));
         sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
         cpu_irq = qdev_get_gpio_in_named(DEVICE(cpu), "EIC", 0);