diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 01:14:30 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 01:15:06 -0400 |
commit | 92549abc6a6573294fc1bb9330db8b52dedfea5f (patch) | |
tree | 02b651c31a267590158b01d7127be1bd74eee640 /drivers/virtio | |
parent | cee51d69a45b6ce202d1d17551165fb3c76dfdb9 (diff) |
virtio_balloon: use simplified virtqueue accessors.
We never add buffers with input and output parts, so use the new accessors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 8dab163c5ef0..bd3ae324a1a2 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -108,7 +108,7 @@ static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) | |||
108 | sg_init_one(&sg, vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns); | 108 | sg_init_one(&sg, vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns); |
109 | 109 | ||
110 | /* We should always be able to add one buffer to an empty queue. */ | 110 | /* We should always be able to add one buffer to an empty queue. */ |
111 | if (virtqueue_add_buf(vq, &sg, 1, 0, vb, GFP_KERNEL) < 0) | 111 | if (virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL) < 0) |
112 | BUG(); | 112 | BUG(); |
113 | virtqueue_kick(vq); | 113 | virtqueue_kick(vq); |
114 | 114 | ||
@@ -256,7 +256,7 @@ static void stats_handle_request(struct virtio_balloon *vb) | |||
256 | if (!virtqueue_get_buf(vq, &len)) | 256 | if (!virtqueue_get_buf(vq, &len)) |
257 | return; | 257 | return; |
258 | sg_init_one(&sg, vb->stats, sizeof(vb->stats)); | 258 | sg_init_one(&sg, vb->stats, sizeof(vb->stats)); |
259 | if (virtqueue_add_buf(vq, &sg, 1, 0, vb, GFP_KERNEL) < 0) | 259 | if (virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL) < 0) |
260 | BUG(); | 260 | BUG(); |
261 | virtqueue_kick(vq); | 261 | virtqueue_kick(vq); |
262 | } | 262 | } |
@@ -341,7 +341,7 @@ static int init_vqs(struct virtio_balloon *vb) | |||
341 | * use it to signal us later. | 341 | * use it to signal us later. |
342 | */ | 342 | */ |
343 | sg_init_one(&sg, vb->stats, sizeof vb->stats); | 343 | sg_init_one(&sg, vb->stats, sizeof vb->stats); |
344 | if (virtqueue_add_buf(vb->stats_vq, &sg, 1, 0, vb, GFP_KERNEL) | 344 | if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL) |
345 | < 0) | 345 | < 0) |
346 | BUG(); | 346 | BUG(); |
347 | virtqueue_kick(vb->stats_vq); | 347 | virtqueue_kick(vb->stats_vq); |