summaryrefslogtreecommitdiff
path: root/include/linux/virtio_config.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-03-06 19:19:39 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-05-02 23:41:42 +0300
commit9b2bbdb227588455afcc3b03475fa9b0a35d83af (patch)
tree38ec6fe9fbfafcc7a388da21d7ec42a668111ec1 /include/linux/virtio_config.h
parent4f6d9bfc882450631251052756ed84658ec88a70 (diff)
downloadlinux-9b2bbdb227588455afcc3b03475fa9b0a35d83af.tar.xz
virtio: wrap find_vqs
We are going to add more parameters to find_vqs, let's wrap the call so we don't need to tweak all drivers every time. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r--include/linux/virtio_config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 8355bab175e1..47f3d805c290 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -179,6 +179,15 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
return vq;
}
+static inline
+int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
+ struct virtqueue *vqs[], vq_callback_t *callbacks[],
+ const char * const names[],
+ struct irq_affinity *desc)
+{
+ return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc);
+}
+
/**
* virtio_device_ready - enable vq use in probe function
* @vdev: the device