summaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio-bus.c
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-04-24 10:21:20 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-24 11:50:20 -0500
commit181103cd52710b987799ae980bb92407994243bc (patch)
tree9442542631a8ef1920719cfaddebad25a7d17c0a /hw/s390x/s390-virtio-bus.c
parenta2f1078b70b6cfc98ed795f17f9d975b1dec1f65 (diff)
downloadqemu-181103cd52710b987799ae980bb92407994243bc.tar.gz
virtio: remove the function pointer.
This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/s390x/s390-virtio-bus.c')
-rw-r--r--hw/s390x/s390-virtio-bus.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 0cfbff6262..f7a2f4bafe 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -136,12 +136,13 @@ static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev)
dev_len = VIRTIO_DEV_OFFS_CONFIG;
dev_len += s390_virtio_device_num_vq(dev) * VIRTIO_VQCONFIG_LEN;
dev_len += dev->feat_len * 2;
- dev_len += vdev->config_len;
+ dev_len += virtio_bus_get_vdev_config_len(&dev->bus);
bus->dev_offs += dev_len;
virtio_bind_device(vdev, &virtio_s390_bindings, DEVICE(dev));
- dev->host_features = vdev->get_features(vdev, dev->host_features);
+ dev->host_features = virtio_bus_get_vdev_features(&dev->bus,
+ dev->host_features);
s390_virtio_device_sync(dev);
s390_virtio_reset_idx(dev);
if (dev->qdev.hotplugged) {
@@ -368,9 +369,7 @@ void s390_virtio_device_sync(VirtIOS390Device *dev)
cur_offs += dev->feat_len * 2;
/* Sync config space */
- if (dev->vdev->get_config) {
- dev->vdev->get_config(dev->vdev, dev->vdev->config);
- }
+ virtio_bus_get_vdev_config(&dev->bus, dev->vdev->config);
cpu_physical_memory_write(cur_offs,
dev->vdev->config, dev->vdev->config_len);