summaryrefslogtreecommitdiffstats
path: root/hw/virtio.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-12-17 13:01:07 +0200
committerMichael S. Tsirkin <mst@redhat.com>2012-12-20 09:20:01 +0200
commitd2a0ccc613ccc48c7240f99e1ce05e0acce6e2a1 (patch)
treef70e87f8d687d6b0cccd09b62308d5fb0d73c32e /hw/virtio.c
parent27dd7730582be85c7d4f680f5f71146629809c86 (diff)
downloadhqemu-d2a0ccc613ccc48c7240f99e1ce05e0acce6e2a1.zip
hqemu-d2a0ccc613ccc48c7240f99e1ce05e0acce6e2a1.tar.gz
virtio: make bindings typesafe
Move bindings from opaque to DeviceState. This gives us better type safety with no performance cost. Add macros to make future QOM work easier. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio.c')
-rw-r--r--hw/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio.c b/hw/virtio.c
index 0455a9e..77b53a9 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -935,7 +935,7 @@ VirtIODevice *virtio_common_init(const char *name, uint16_t device_id,
}
void virtio_bind_device(VirtIODevice *vdev, const VirtIOBindings *binding,
- void *opaque)
+ DeviceState *opaque)
{
vdev->binding = binding;
vdev->binding_opaque = opaque;
OpenPOWER on IntegriCloud