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>
This commit is contained in:
Andreas Färber 2012-11-25 18:47:58 +01:00
parent 58cd986422
commit a15d09127b
4 changed files with 47 additions and 26 deletions

View file

@ -68,7 +68,6 @@ typedef struct PITCommonState {
typedef struct PITCommonClass {
ISADeviceClass parent_class;
int (*init)(PITCommonState *s);
void (*set_channel_gate)(PITCommonState *s, PITChannelState *sc, int val);
void (*get_channel_info)(PITCommonState *s, PITChannelState *sc,
PITChannelInfo *info);