[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] isa/pc87312: use helper to be more easier to understand when
From: |
Mao Zhongyi |
Subject: |
[PATCH 2/2] isa/pc87312: use helper to be more easier to understand when using abstract QOM parent functions. |
Date: |
Sat, 12 Oct 2019 17:43:23 +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 pc87312
missed helper, so convert it.
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Mao Zhongyi <address@hidden>
---
hw/isa/pc87312.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index b9bd57471e..13c1c43d2f 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -338,8 +338,7 @@ 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