aboutsummaryrefslogtreecommitdiff
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
commitb708e31185e060dac0fbc1420656f1dc812451eb (patch)
treebadd55f0ada441b112da9acaeddcffa108071402
parentf09a8d8dc9687c9ad1a5bae26c8e15516f6798a6 (diff)
downloadqemu-b708e31185e060dac0fbc1420656f1dc812451eb.zip
qemu-b708e31185e060dac0fbc1420656f1dc812451eb.tar.gz
qemu-b708e31185e060dac0fbc1420656f1dc812451eb.tar.bz2
target: 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-8-philmd@linaro.org>
-rw-r--r--target/mips/cpu.c2
-rw-r--r--target/xtensa/cpu.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index e3af02a..47cd7cf 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -644,7 +644,7 @@ MIPSCPU *mips_cpu_create_with_clock(const char *cpu_type, Clock *cpu_refclk,
{
DeviceState *cpu;
- cpu = DEVICE(object_new(cpu_type));
+ cpu = qdev_new(cpu_type);
qdev_connect_clock_in(cpu, "clk-in", cpu_refclk);
object_property_set_bool(OBJECT(cpu), "big-endian", is_big_endian,
&error_abort);
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 0910a3d..4eb699d 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -208,7 +208,7 @@ XtensaCPU *xtensa_cpu_create_with_clock(const char *cpu_type, Clock *cpu_refclk)
{
DeviceState *cpu;
- cpu = DEVICE(object_new(cpu_type));
+ cpu = qdev_new(cpu_type);
qdev_connect_clock_in(cpu, "clk-in", cpu_refclk);
qdev_realize(cpu, NULL, &error_abort);