diff options
author | Andreas Färber <afaerber@suse.de> | 2012-11-25 18:47:58 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-07 14:55:24 +0200 |
commit | a15d09127b104d1c35fc22bdd65263fe62462b30 (patch) | |
tree | 6e1c6bc2916319b3c581442907c1c8b680b6f378 /hw/timer/i8254_common.c | |
parent | 58cd986422d7353e7fac56969ac59daab3cdca67 (diff) |
i8254: Convert PITCommonState to QOM realizefn
Instead of having the parent provide PITCommonClass::init,
let the children override DeviceClass::realize themselves.
This pushes the responsibility for saving and calling the parent's
realizefn to the children.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/timer/i8254_common.c')
-rw-r--r-- | hw/timer/i8254_common.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c index 36eed80ed0..4e5bf0b63c 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c @@ -170,14 +170,6 @@ static void pit_common_realize(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); PITCommonState *pit = PIT_COMMON(dev); - PITCommonClass *c = PIT_COMMON_GET_CLASS(pit); - int ret; - - ret = c->init(pit); - if (ret < 0) { - error_setg(errp, "PIT init failed."); - return; - } isa_register_ioport(isadev, &pit->ioports, pit->iobase); |