From: Jiri Pirko <jiri@xxxxxxxxxx> In order to prepare for conversion of virtio_find_vqs*() arguments, make virtio_find_single_vq() to call virtio_find_vqs() instead of op directly. Signed-off-by: Jiri Pirko <jiri@xxxxxxxxxx> --- include/linux/virtio_config.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index d19eaf6bafbf..82a1d798b2f1 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -210,20 +210,6 @@ static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev) return !virtio_has_feature(vdev, VIRTIO_F_ACCESS_PLATFORM); } -static inline -struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev, - vq_callback_t *c, const char *n) -{ - vq_callback_t *callbacks[] = { c }; - const char *names[] = { n }; - struct virtqueue *vq; - int err = vdev->config->find_vqs(vdev, 1, &vq, callbacks, names, NULL, - NULL); - if (err < 0) - return ERR_PTR(err); - return vq; -} - static inline int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], @@ -244,6 +230,20 @@ int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs, names, NULL, desc); } +static inline +struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev, + vq_callback_t *c, const char *n) +{ + vq_callback_t *callbacks[] = { c }; + const char *names[] = { n }; + struct virtqueue *vq; + int err = virtio_find_vqs(vdev, 1, &vq, callbacks, names, NULL); + + if (err < 0) + return ERR_PTR(err); + return vq; +} + /** * virtio_synchronize_cbs - synchronize with virtqueue callbacks * @dev: the virtio device -- 2.45.2