hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

Prefer QDev API for QDev objects, avoid the underlying QOM layer.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20240216110313.17039-6-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-02-14 16:52:24 +01:00
parent 1f88173ab9
commit d06c2f7695

View File

@ -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 {