summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2024-07-08 09:48:12 +0200
committerMichael S. Tsirkin <mst@redhat.com>2024-07-17 11:20:58 +0200
commitc95e67bac42d7e671e6a2c14548b6a7f76e71235 (patch)
treef0fc2e0608f068a3f99dd700850554baa968a4f5 /drivers/rpmsg
parentvirtio_balloon: convert to use virtio_find_vqs_info() (diff)
downloadlinux-c95e67bac42d7e671e6a2c14548b6a7f76e71235.tar.xz
linux-c95e67bac42d7e671e6a2c14548b6a7f76e71235.zip
virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()
Instead of passing separate names and callbacks arrays to virtio_find_vqs(), have one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240708074814.1739223-18-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/virtio_rpmsg_bus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index e9e8c1f7829f..fb466ef20f07 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -868,8 +868,10 @@ static void rpmsg_virtio_del_ctrl_dev(struct rpmsg_device *rpdev_ctrl)
static int rpmsg_probe(struct virtio_device *vdev)
{
- vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
- static const char * const names[] = { "input", "output" };
+ struct virtqueue_info vqs_info[] = {
+ { "input", rpmsg_recv_done },
+ { "output", rpmsg_xmit_done },
+ };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
@@ -891,7 +893,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
init_waitqueue_head(&vrp->sendq);
/* We expect two virtqueues, rx and tx (and in this order) */
- err = virtio_find_vqs(vdev, 2, vqs, vq_cbs, names, NULL);
+ err = virtio_find_vqs_info(vdev, 2, vqs, vqs_info, NULL);
if (err)
goto free_vrp;