Skip to content

Commit

Permalink
hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
Browse files Browse the repository at this point in the history
Use device_class_set_parent_realize() to set parent realize() directly.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
trueptolemy authored and Michael Tokarev committed Feb 13, 2024
1 parent 1998579 commit f669bd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/isa/pc87312.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ 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;
dc->reset = pc87312_reset;
dc->vmsd = &vmstate_pc87312;
device_class_set_parent_realize(dc, pc87312_realize,
&sc->parent_realize);
device_class_set_props(dc, pc87312_properties);

sc->parallel = (ISASuperIOFuncs){
Expand Down

0 comments on commit f669bd8

Please sign in to comment.