Skip to content

Commit

Permalink
virtio-rng: use virtqueue_xxx wrappers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael S. Tsirkin authored and Rusty Russell committed May 19, 2010
1 parent 7c5e9ed commit 28cfc82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/hw_random/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 28cfc82

Please sign in to comment.