summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/virtio-rng.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-04-13 16:11:42 +0300
committerRusty Russell <rusty@rustcorp.com.au>2010-05-19 22:15:45 +0930
commit28cfc828e7e1efc620df70b99519784333abcffd (patch)
treef410279611b3b1f71d1482daf0d6fb7a10e12e83 /drivers/char/hw_random/virtio-rng.c
parent7c5e9ed0c84e7d70d887878574590638d5572659 (diff)
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>
Diffstat (limited to 'drivers/char/hw_random/virtio-rng.c')
-rw-r--r--drivers/char/hw_random/virtio-rng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index 64fe0a793efd..75f1cbd61c17 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -32,7 +32,7 @@ static bool busy;
static void random_recv_done(struct virtqueue *vq)
{
/* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
- if (!vq->vq_ops->get_buf(vq, &data_avail))
+ if (!virtqueue_get_buf(vq, &data_avail))
return;
complete(&have_data);
@@ -46,10 +46,10 @@ static void register_buffer(u8 *buf, size_t size)
sg_init_one(&sg, buf, size);
/* There should always be room for one buffer. */
- if (vq->vq_ops->add_buf(vq, &sg, 0, 1, buf) < 0)
+ if (virtqueue_add_buf(vq, &sg, 0, 1, buf) < 0)
BUG();
- vq->vq_ops->kick(vq);
+ virtqueue_kick(vq);
}
static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)