[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API |
Date: |
Fri, 16 Feb 2024 12:02:56 +0100 |
Prefer QDev API for QDev objects, avoid the underlying QOM layer.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ppc/pnv_bmc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c
index 99f1e8d7f9..0c1274df21 100644
--- a/hw/ppc/pnv_bmc.c
+++ b/hw/ppc/pnv_bmc.c
@@ -269,13 +269,13 @@ void pnv_bmc_set_pnor(IPMIBmc *bmc, PnvPnor *pnor)
*/
IPMIBmc *pnv_bmc_create(PnvPnor *pnor)
{
- Object *obj;
+ DeviceState *dev;
- obj = object_new(TYPE_IPMI_BMC_SIMULATOR);
- qdev_realize(DEVICE(obj), NULL, &error_fatal);
- pnv_bmc_set_pnor(IPMI_BMC(obj), pnor);
+ dev = qdev_new(TYPE_IPMI_BMC_SIMULATOR);
+ qdev_realize(dev, NULL, &error_fatal);
+ pnv_bmc_set_pnor(IPMI_BMC(dev), pnor);
- return IPMI_BMC(obj);
+ return IPMI_BMC(dev);
}
typedef struct ForeachArgs {
--
2.41.0
- [PATCH 00/21] hw: More QDev cleanups, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style, Philippe Mathieu-Daudé, 2024/02/16
- [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é <=
- [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 08/21] hw/isa: Inline isa_try_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 09/21] hw/usb: Inline usb_try_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 10/21] hw/usb: Inline usb_new(), Philippe Mathieu-Daudé, 2024/02/16