Skip to content

Commit

Permalink
virtio_rng: use simplified virtqueue accessors.
Browse files Browse the repository at this point in the history
We never add buffers with input and output parts, so use the new accessors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Asias He <asias@redhat.com>
  • Loading branch information
Rusty Russell committed Mar 20, 2013
1 parent 9dc7b9e commit fb6aa6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/hw_random/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void register_buffer(u8 *buf, size_t size)
sg_init_one(&sg, buf, size);

/* There should always be room for one buffer. */
if (virtqueue_add_buf(vq, &sg, 0, 1, buf, GFP_KERNEL) < 0)
if (virtqueue_add_inbuf(vq, &sg, 1, buf, GFP_KERNEL) < 0)
BUG();

virtqueue_kick(vq);
Expand Down

0 comments on commit fb6aa6f

Please sign in to comment.