diff mbox series

[1/5] hw/misc/macio: Set QDev properties using QDev API

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

Commit Message

Philippe Mathieu-Daudé Feb. 3, 2023, 9:16 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.

All calls use errp=&error_abort, so converting to the
QDev API is a no-op (QDev API always uses &error_abort).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/misc/macio/macio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 08dbdd7fc0..66393280f1 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -128,8 +128,7 @@  static void macio_realize_ide(MacIOState *s, MACIOIDEState *ide,
     sysbus_connect_irq(sysbus_dev, 0, irq0);
     sysbus_connect_irq(sysbus_dev, 1, irq1);
     qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid);
-    object_property_set_link(OBJECT(ide), "dbdma", OBJECT(&s->dbdma),
-                             &error_abort);
+    qdev_prop_set_link(DEVICE(ide), "dbdma", OBJECT(&s->dbdma));
     macio_ide_register_dma(ide);
 
     qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp);
@@ -336,8 +335,7 @@  static void macio_newworld_realize(PCIDevice *d, Error **errp)
 
         /* PMU */
         object_initialize_child(OBJECT(s), "pmu", &s->pmu, TYPE_VIA_PMU);
-        object_property_set_link(OBJECT(&s->pmu), "gpio", OBJECT(sysbus_dev),
-                                 &error_abort);
+        qdev_prop_set_link(DEVICE(&s->pmu), "gpio", OBJECT(sysbus_dev));
         qdev_prop_set_bit(DEVICE(&s->pmu), "has-adb", ns->has_adb);
         if (!qdev_realize(DEVICE(&s->pmu), BUS(&s->macio_bus), errp)) {
             return;