diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 17:22:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 17:22:52 -0700 |
commit | 1756ac3d3c41341297ea25b818b7fce505bb2a9a (patch) | |
tree | 96382220afbb82fd5c576c4c08b3c3e13282851f /drivers/virtio/virtio_balloon.c | |
parent | 98edb6ca4174f17a64890a02f44c211c8b44fb3c (diff) | |
parent | 0643e4c6e4fd67778fa886a89e6ec2320e0ff4d3 (diff) |
Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (27 commits)
drivers/char: Eliminate use after free
virtio: console: Accept console size along with resize control message
virtio: console: Store each console's size in the console structure
virtio: console: Resize console port 0 on config intr only if multiport is off
virtio: console: Add support for nonblocking write()s
virtio: console: Rename wait_is_over() to will_read_block()
virtio: console: Don't always create a port 0 if using multiport
virtio: console: Use a control message to add ports
virtio: console: Move code around for future patches
virtio: console: Remove config work handler
virtio: console: Don't call hvc_remove() on unplugging console ports
virtio: console: Return -EPIPE to hvc_console if we lost the connection
virtio: console: Let host know of port or device add failures
virtio: console: Add a __send_control_msg() that can send messages without a valid port
virtio: Revert "virtio: disable multiport console support."
virtio: add_buf_gfp
trans_virtio: use virtqueue_xxx wrappers
virtio-rng: use virtqueue_xxx wrappers
virtio_ring: remove a level of indirection
virtio_net: use virtqueue_xxx wrappers
...
Fix up conflicts in drivers/net/virtio_net.c due to new virtqueue_xxx
wrappers changes conflicting with some other cleanups.
Diffstat (limited to 'drivers/virtio/virtio_balloon.c')
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index bfec7c29486d..0f1da45ba47d 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -75,7 +75,7 @@ static void balloon_ack(struct virtqueue *vq) struct virtio_balloon *vb; unsigned int len; - vb = vq->vq_ops->get_buf(vq, &len); + vb = virtqueue_get_buf(vq, &len); if (vb) complete(&vb->acked); } @@ -89,9 +89,9 @@ static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) init_completion(&vb->acked); /* We should always be able to add one buffer to an empty queue. */ - if (vq->vq_ops->add_buf(vq, &sg, 1, 0, vb) < 0) + if (virtqueue_add_buf(vq, &sg, 1, 0, vb) < 0) BUG(); - vq->vq_ops->kick(vq); + virtqueue_kick(vq); /* When host has read buffer, this completes via balloon_ack */ wait_for_completion(&vb->acked); @@ -204,7 +204,7 @@ static void stats_request(struct virtqueue *vq) struct virtio_balloon *vb; unsigned int len; - vb = vq->vq_ops->get_buf(vq, &len); + vb = virtqueue_get_buf(vq, &len); if (!vb) return; vb->need_stats_update = 1; @@ -221,9 +221,9 @@ static void stats_handle_request(struct virtio_balloon *vb) vq = vb->stats_vq; sg_init_one(&sg, vb->stats, sizeof(vb->stats)); - if (vq->vq_ops->add_buf(vq, &sg, 1, 0, vb) < 0) + if (virtqueue_add_buf(vq, &sg, 1, 0, vb) < 0) BUG(); - vq->vq_ops->kick(vq); + virtqueue_kick(vq); } static void virtballoon_changed(struct virtio_device *vdev) @@ -314,10 +314,9 @@ static int virtballoon_probe(struct virtio_device *vdev) * use it to signal us later. */ sg_init_one(&sg, vb->stats, sizeof vb->stats); - if (vb->stats_vq->vq_ops->add_buf(vb->stats_vq, - &sg, 1, 0, vb) < 0) + if (virtqueue_add_buf(vb->stats_vq, &sg, 1, 0, vb) < 0) BUG(); - vb->stats_vq->vq_ops->kick(vb->stats_vq); + virtqueue_kick(vb->stats_vq); } vb->thread = kthread_run(balloon, vb, "vballoon"); |