aboutsummaryrefslogtreecommitdiff
path: root/hw/sparc
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-12-16 03:07:33 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-13 17:06:35 +0100
commit901b78a0eeda7d8d955e9ffe6608801df14b5638 (patch)
treef498299200554d44c81704afff4b767c12d62e61 /hw/sparc
parentb708e31185e060dac0fbc1420656f1dc812451eb (diff)
downloadqemu-901b78a0eeda7d8d955e9ffe6608801df14b5638.zip
qemu-901b78a0eeda7d8d955e9ffe6608801df14b5638.tar.gz
qemu-901b78a0eeda7d8d955e9ffe6608801df14b5638.tar.bz2
hw: Replace DEVICE(object_new) -> qdev_new()
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20240216110313.17039-7-philmd@linaro.org>
Diffstat (limited to 'hw/sparc')
-rw-r--r--hw/sparc/sun4m.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 217a69e..e070360 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -974,7 +974,7 @@ static void sun4m_hw_init(MachineState *machine)
sysbus_mmio_map(s, 0, hwdef->ms_kb_base);
/* Logically OR both its IRQs together */
- ms_kb_orgate = DEVICE(object_new(TYPE_OR_IRQ));
+ ms_kb_orgate = qdev_new(TYPE_OR_IRQ);
object_property_set_int(OBJECT(ms_kb_orgate), "num-lines", 2, &error_fatal);
qdev_realize_and_unref(ms_kb_orgate, NULL, &error_fatal);
sysbus_connect_irq(s, 0, qdev_get_gpio_in(ms_kb_orgate, 0));
@@ -995,7 +995,7 @@ static void sun4m_hw_init(MachineState *machine)
sysbus_mmio_map(s, 0, hwdef->serial_base);
/* Logically OR both its IRQs together */
- serial_orgate = DEVICE(object_new(TYPE_OR_IRQ));
+ serial_orgate = qdev_new(TYPE_OR_IRQ);
object_property_set_int(OBJECT(serial_orgate), "num-lines", 2,
&error_fatal);
qdev_realize_and_unref(serial_orgate, NULL, &error_fatal);