aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-03-20 01:14:29 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-03-20 01:15:05 -0400
commitcee51d69a45b6ce202d1d17551165fb3c76dfdb9 (patch)
tree61585898ca0fe9bbc51dbb8fc2ef8c31e5f1731c /drivers/rpmsg
parent71bcbecc89a6b24f2c60d3e4271e76013fa46860 (diff)
virtio_rpmsg_bus: use simplified virtqueue accessors.
We never add buffers with input and output parts, so use the new accessors. Cc: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/virtio_rpmsg_bus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index a59684b5fc68..33d827b30e95 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -757,14 +757,14 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst,
757 mutex_lock(&vrp->tx_lock); 757 mutex_lock(&vrp->tx_lock);
758 758
759 /* add message to the remote processor's virtqueue */ 759 /* add message to the remote processor's virtqueue */
760 err = virtqueue_add_buf(vrp->svq, &sg, 1, 0, msg, GFP_KERNEL); 760 err = virtqueue_add_outbuf(vrp->svq, &sg, 1, msg, GFP_KERNEL);
761 if (err) { 761 if (err) {
762 /* 762 /*
763 * need to reclaim the buffer here, otherwise it's lost 763 * need to reclaim the buffer here, otherwise it's lost
764 * (memory won't leak, but rpmsg won't use it again for TX). 764 * (memory won't leak, but rpmsg won't use it again for TX).
765 * this will wait for a buffer management overhaul. 765 * this will wait for a buffer management overhaul.
766 */ 766 */
767 dev_err(dev, "virtqueue_add_buf failed: %d\n", err); 767 dev_err(dev, "virtqueue_add_outbuf failed: %d\n", err);
768 goto out; 768 goto out;
769 } 769 }
770 770
@@ -839,7 +839,7 @@ static void rpmsg_recv_done(struct virtqueue *rvq)
839 sg_init_one(&sg, msg, RPMSG_BUF_SIZE); 839 sg_init_one(&sg, msg, RPMSG_BUF_SIZE);
840 840
841 /* add the buffer back to the remote processor's virtqueue */ 841 /* add the buffer back to the remote processor's virtqueue */
842 err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, msg, GFP_KERNEL); 842 err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, msg, GFP_KERNEL);
843 if (err < 0) { 843 if (err < 0) {
844 dev_err(dev, "failed to add a virtqueue buffer: %d\n", err); 844 dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
845 return; 845 return;
@@ -970,7 +970,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
970 970
971 sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE); 971 sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
972 972
973 err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, cpu_addr, 973 err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
974 GFP_KERNEL); 974 GFP_KERNEL);
975 WARN_ON(err); /* sanity check; this can't really happen */ 975 WARN_ON(err); /* sanity check; this can't really happen */
976 } 976 }