[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new() |
Date: |
Fri, 16 Feb 2024 12:02:58 +0100 |
Prefer QDev API for QDev objects, avoid the underlying QOM layer.
Signed-off-by: Philippe Mathieu-Daudé <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 d644adbc77..6b3909ee08 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -649,7 +649,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);
qdev_realize(cpu, NULL, &error_abort);
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 79f91819df..4f9408e1a0 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -205,7 +205,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.41.0
- [PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API, (continued)
- [PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new(),
Philippe Mathieu-Daudé <=
- [PATCH 09/21] hw/usb: Inline usb_try_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 08/21] hw/isa: Inline isa_try_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 10/21] hw/usb: Inline usb_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState, Philippe Mathieu-Daudé, 2024/02/16