diff mbox series

[11/19] hw/hppa: Set QDev properties using QDev API

Message ID 20230203180914.49112-12-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/hppa/machine.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index de1cc7ab71..6bd6a8d722 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -166,8 +166,7 @@  static DinoState *dino_init(MemoryRegion *addr_space)
     DeviceState *dev;
 
     dev = qdev_new(TYPE_DINO_PCI_HOST_BRIDGE);
-    object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
-                             &error_fatal);
+    qdev_prop_set_link(dev, "memory-as", OBJECT(addr_space));
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
     return DINO_PCI_HOST_BRIDGE(dev);