summaryrefslogtreecommitdiff
path: root/hw/input/vmmouse.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-11-25 02:37:14 +0100
committerAndreas Färber <afaerber@suse.de>2013-06-07 12:14:45 +0200
commitdb895a1e6a97e919f9b86d60c969377357b05066 (patch)
tree72f6786abe90f7fa77d2f10416df73cb9d62e35a /hw/input/vmmouse.c
parenta3dcca567a1d4a5c79fb9c8fe2d9a21a4a7cebd5 (diff)
downloadqemu-db895a1e6a97e919f9b86d60c969377357b05066.tar.gz
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/input/vmmouse.c')
-rw-r--r--hw/input/vmmouse.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/input/vmmouse.c b/hw/input/vmmouse.c
index a610738374..abd032b794 100644
--- a/hw/input/vmmouse.c
+++ b/hw/input/vmmouse.c
@@ -261,7 +261,7 @@ static void vmmouse_reset(DeviceState *d)
vmmouse_disable(s);
}
-static int vmmouse_initfn(ISADevice *dev)
+static void vmmouse_realizefn(DeviceState *dev, Error **errp)
{
VMMouseState *s = VMMOUSE(dev);
@@ -270,8 +270,6 @@ static int vmmouse_initfn(ISADevice *dev)
vmport_register(VMMOUSE_STATUS, vmmouse_ioport_read, s);
vmport_register(VMMOUSE_COMMAND, vmmouse_ioport_read, s);
vmport_register(VMMOUSE_DATA, vmmouse_ioport_read, s);
-
- return 0;
}
static Property vmmouse_properties[] = {
@@ -282,8 +280,8 @@ static Property vmmouse_properties[] = {
static void vmmouse_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
- ic->init = vmmouse_initfn;
+
+ dc->realize = vmmouse_realizefn;
dc->no_user = 1;
dc->reset = vmmouse_reset;
dc->vmsd = &vmstate_vmmouse;