Skip to content

Commit 6269aad

Browse files
trueptolemyMichael Tokarev
authored andcommitted
hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
Use device_class_set_parent_realize() to set parent realize() directly. Signed-off-by: Zhao Liu <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
1 parent f669bd8 commit 6269aad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hw/intc/s390_flic_kvm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,10 @@ static void kvm_s390_flic_class_init(ObjectClass *oc, void *data)
646646
{
647647
DeviceClass *dc = DEVICE_CLASS(oc);
648648
S390FLICStateClass *fsc = S390_FLIC_COMMON_CLASS(oc);
649+
KVMS390FLICStateClass *kfsc = KVM_S390_FLIC_CLASS(oc);
649650

650-
KVM_S390_FLIC_CLASS(oc)->parent_realize = dc->realize;
651-
dc->realize = kvm_s390_flic_realize;
651+
device_class_set_parent_realize(dc, kvm_s390_flic_realize,
652+
&kfsc->parent_realize);
652653
dc->vmsd = &kvm_s390_flic_vmstate;
653654
dc->reset = kvm_s390_flic_reset;
654655
fsc->register_io_adapter = kvm_s390_register_io_adapter;

0 commit comments

Comments
 (0)