[Qemu-devel] [PATCH] isa/pc87312: use device_class_set_parent_realize

Mao Zhongyi posted 1 patch 6 years, 2 months ago
Test FreeBSD passed
Test docker-mingw@fedora passed
Test asan passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test s390x failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190816044156.386502-1-maozhongyi@cmss.chinamobile.com
Maintainers: "Hervé Poussineau" <hpoussin@reactos.org>
hw/isa/pc87312.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] isa/pc87312: use device_class_set_parent_realize
Posted by Mao Zhongyi 6 years, 2 months ago
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 hw/isa/pc87312.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index 85dbc94439..e95176c148 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -336,8 +336,8 @@ static void pc87312_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
 
-    sc->parent_realize = dc->realize;
-    dc->realize = pc87312_realize;
+    device_class_set_parent_realize(dc, pc87312_realize,
+                                    &sc->parent_realize);
     dc->reset = pc87312_reset;
     dc->vmsd = &vmstate_pc87312;
     dc->props = pc87312_properties;
-- 
2.17.1