[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/49] target: Replace DEVICE(object_new) -> qdev_new()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/49] target: Replace DEVICE(object_new) -> qdev_new() |
Date: |
Sun, 12 Jan 2025 23:16:38 +0100 |
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>
---
target/mips/cpu.c | 2 +-
target/xtensa/cpu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index e3af02a4e6d..47cd7cfdcef 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 0910a3d2904..4eb699d1f45 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);
--
2.47.1
- [PULL 00/49] Misc HW patches for 2025-01-12, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 01/49] pc-bios/meson.build: Silent unuseful DTC warnings, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 02/49] target: Replace DEVICE(object_new) -> qdev_new(),
Philippe Mathieu-Daudé <=
- [PULL 05/49] hw/usb: Inline usb_try_new(), Philippe Mathieu-Daudé, 2025/01/12
- [PULL 04/49] hw: Add QOM parentship relation with CPUs, Philippe Mathieu-Daudé, 2025/01/12
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Igor Mammedov, 2025/01/13
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Philippe Mathieu-Daudé, 2025/01/13
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Igor Mammedov, 2025/01/14
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Markus Armbruster, 2025/01/14
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Igor Mammedov, 2025/01/15
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Peter Xu, 2025/01/15
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Zhao Liu, 2025/01/14
- Re: [PULL 04/49] hw: Add QOM parentship relation with CPUs, Igor Mammedov, 2025/01/15