Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio-rng: use virtqueue_xxx wrappers

Switch virtio-rng to new virtqueue_xxx wrappers.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

authored by

Michael S. Tsirkin and committed by
Rusty Russell
28cfc828 7c5e9ed0

+3 -3
+3 -3
drivers/char/hw_random/virtio-rng.c
··· 32 32 static void random_recv_done(struct virtqueue *vq) 33 33 { 34 34 /* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */ 35 - if (!vq->vq_ops->get_buf(vq, &data_avail)) 35 + if (!virtqueue_get_buf(vq, &data_avail)) 36 36 return; 37 37 38 38 complete(&have_data); ··· 46 46 sg_init_one(&sg, buf, size); 47 47 48 48 /* There should always be room for one buffer. */ 49 - if (vq->vq_ops->add_buf(vq, &sg, 0, 1, buf) < 0) 49 + if (virtqueue_add_buf(vq, &sg, 0, 1, buf) < 0) 50 50 BUG(); 51 51 52 - vq->vq_ops->kick(vq); 52 + virtqueue_kick(vq); 53 53 } 54 54 55 55 static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)