qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] arm/smmuv3: use helper to be more easier to understand when


From: Mao Zhongyi
Subject: [PATCH 1/2] arm/smmuv3: use helper to be more easier to understand when using abstract QOM parent functions.
Date: Sat, 12 Oct 2019 17:43:22 +0800

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: address@hidden
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Mao Zhongyi <address@hidden>
---
 hw/arm/smmuv3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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,
-- 
2.17.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]