Message ID | 20191012094323.234788-2-maozhongyi@cmss.chinamobile.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | use helper when using abstract QOM parent functions | expand |
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index e2fbb8357e..65b6b158e5 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1465,8 +1465,7 @@ static void smmuv3_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_smmuv3; device_class_set_parent_reset(dc, smmu_reset, &c->parent_reset); - c->parent_realize = dc->realize; - dc->realize = smmu_realize; + device_class_set_parent_realize(dc, smmu_realize, &c->parent_realize); } static int smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,
Philippe introduced a series of helpers to make the device class_init() easier to understand when a device class change the parent hooks, device smmuv3 missed helper, so convert it. Cc: eric.auger@redhat.com Cc: peter.maydell@linaro.org Cc: f4bug@amsat.org Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com> --- hw/arm/smmuv3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)