diff options
author | Jiri Pirko <jiri@nvidia.com> | 2024-07-08 09:48:12 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-17 11:20:58 +0200 |
commit | c95e67bac42d7e671e6a2c14548b6a7f76e71235 (patch) | |
tree | f0fc2e0608f068a3f99dd700850554baa968a4f5 /drivers/bluetooth | |
parent | virtio_balloon: convert to use virtio_find_vqs_info() (diff) | |
download | linux-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/bluetooth')
-rw-r--r-- | drivers/bluetooth/virtio_bt.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c index 40bd83825c29..79574855ed54 100644 --- a/drivers/bluetooth/virtio_bt.c +++ b/drivers/bluetooth/virtio_bt.c @@ -254,13 +254,9 @@ static void virtbt_rx_done(struct virtqueue *vq) static int virtbt_probe(struct virtio_device *vdev) { - vq_callback_t *callbacks[VIRTBT_NUM_VQS] = { - [VIRTBT_VQ_TX] = virtbt_tx_done, - [VIRTBT_VQ_RX] = virtbt_rx_done, - }; - const char *names[VIRTBT_NUM_VQS] = { - [VIRTBT_VQ_TX] = "tx", - [VIRTBT_VQ_RX] = "rx", + struct virtqueue_info vqs_info[VIRTBT_NUM_VQS] = { + [VIRTBT_VQ_TX] = { "tx", virtbt_tx_done }, + [VIRTBT_VQ_RX] = { "rx", virtbt_rx_done }, }; struct virtio_bluetooth *vbt; struct hci_dev *hdev; @@ -288,8 +284,8 @@ static int virtbt_probe(struct virtio_device *vdev) INIT_WORK(&vbt->rx, virtbt_rx_work); - err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, callbacks, - names, NULL); + err = virtio_find_vqs_info(vdev, VIRTBT_NUM_VQS, vbt->vqs, + vqs_info, NULL); if (err) return err; |