aboutsummaryrefslogtreecommitdiff
path: root/hw/char/ipoctal232.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-01 18:45:02 +0200
committerAndreas Färber <afaerber@suse.de>2014-02-14 21:07:20 +0100
commit5c570902559fbc113154e545c4b0749cd4318b1d (patch)
tree809f66ab1037ab8fd7dc47d2390f1bf52c547493 /hw/char/ipoctal232.c
parent371468297c8bc45d9f4b957372ed62c9314620c8 (diff)
ipack: Convert to QOM realize
Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/char/ipoctal232.c')
-rw-r--r--hw/char/ipoctal232.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c
index 88e2ccae75..b33cfff6e8 100644
--- a/hw/char/ipoctal232.c
+++ b/hw/char/ipoctal232.c
@@ -534,9 +534,9 @@ static void hostdev_event(void *opaque, int event)
}
}
-static int ipoctal_init(IPackDevice *ip)
+static void ipoctal_realize(DeviceState *dev, Error **errp)
{
- IPOctalState *s = IPOCTAL(ip);
+ IPOctalState *s = IPOCTAL(dev);
unsigned i;
for (i = 0; i < N_CHANNELS; i++) {
@@ -552,8 +552,6 @@ static int ipoctal_init(IPackDevice *ip)
DPRINTF("Could not redirect channel %u, no chardev set\n", i);
}
}
-
- return 0;
}
static Property ipoctal_properties[] = {
@@ -573,7 +571,7 @@ static void ipoctal_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
IPackDeviceClass *ic = IPACK_DEVICE_CLASS(klass);
- ic->init = ipoctal_init;
+ ic->realize = ipoctal_realize;
ic->io_read = io_read;
ic->io_write = io_write;
ic->id_read = id_read;