diff options
author | Andreas Färber <afaerber@suse.de> | 2012-11-25 02:37:14 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-07 12:14:45 +0200 |
commit | db895a1e6a97e919f9b86d60c969377357b05066 (patch) | |
tree | 72f6786abe90f7fa77d2f10416df73cb9d62e35a /hw/misc/sga.c | |
parent | a3dcca567a1d4a5c79fb9c8fe2d9a21a4a7cebd5 (diff) |
isa: Use realizefn for ISADevice
Drop ISADeviceClass::init and the resulting no-op initfn and let
children implement their own realizefn. Adapt error handling.
Split off an instance_init where sensible.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/misc/sga.c')
-rw-r--r-- | hw/misc/sga.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/misc/sga.c b/hw/misc/sga.c index c842190999..08803e7ddc 100644 --- a/hw/misc/sga.c +++ b/hw/misc/sga.c @@ -38,17 +38,16 @@ typedef struct ISASGAState { ISADevice parent_obj; } ISASGAState; -static int sga_initfn(ISADevice *dev) +static void sga_realizefn(DeviceState *dev, Error **errp) { rom_add_vga(SGABIOS_FILENAME); - return 0; } static void sga_class_initfn(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); - ic->init = sga_initfn; + + dc->realize = sga_realizefn; dc->desc = "Serial Graphics Adapter"; } |