i8259: Convert PICCommonState to use QOM realizefn

Instead of having the parent provide PICCommonClass::init,
let the children override DeviceClass::realize themselves.
This pushes the responsibility of saving and calling the parent's
realizefn to the children.

Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Andreas Färber 2012-11-25 22:54:47 +01:00
parent 49fdb0c1c4
commit d2628b7d18
4 changed files with 46 additions and 10 deletions

View file

@ -42,7 +42,7 @@ typedef struct PICCommonState PICCommonState;
typedef struct PICCommonClass
{
ISADeviceClass parent_class;
void (*init)(PICCommonState *s);
void (*pre_save)(PICCommonState *s);
void (*post_load)(PICCommonState *s);
} PICCommonClass;