virtio_card.c (c95e67bac42d7e671e6a2c14548b6a7f76e71235) virtio_card.c (6c85d6b653caeba2ef982925703cbb4f2b3b3163)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * virtio-snd: Virtio sound device
4 * Copyright (C) 2021 OpenSynergy GmbH
5 */
6#include <linux/module.h>
7#include <linux/moduleparam.h>
8#include <linux/virtio_config.h>

--- 111 unchanged lines hidden (view full) ---

120 [VIRTIO_SND_VQ_RX] = { "virtsnd-rx",
121 virtsnd_pcm_rx_notify_cb },
122 };
123 struct virtqueue *vqs[VIRTIO_SND_VQ_MAX] = { 0 };
124 unsigned int i;
125 unsigned int n;
126 int rc;
127
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * virtio-snd: Virtio sound device
4 * Copyright (C) 2021 OpenSynergy GmbH
5 */
6#include <linux/module.h>
7#include <linux/moduleparam.h>
8#include <linux/virtio_config.h>

--- 111 unchanged lines hidden (view full) ---

120 [VIRTIO_SND_VQ_RX] = { "virtsnd-rx",
121 virtsnd_pcm_rx_notify_cb },
122 };
123 struct virtqueue *vqs[VIRTIO_SND_VQ_MAX] = { 0 };
124 unsigned int i;
125 unsigned int n;
126 int rc;
127
128 rc = virtio_find_vqs_info(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL);
128 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL);
129 if (rc) {
130 dev_err(&vdev->dev, "failed to initialize virtqueues\n");
131 return rc;
132 }
133
134 for (i = 0; i < VIRTIO_SND_VQ_MAX; ++i)
135 snd->queues[i].vqueue = vqs[i];
136

--- 318 unchanged lines hidden ---
129 if (rc) {
130 dev_err(&vdev->dev, "failed to initialize virtqueues\n");
131 return rc;
132 }
133
134 for (i = 0; i < VIRTIO_SND_VQ_MAX; ++i)
135 snd->queues[i].vqueue = vqs[i];
136

--- 318 unchanged lines hidden ---