aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Guzman Lugo <fernando.lugo@ti.com>2012-08-22 14:55:18 -0500
committerOmar Ramirez Luna <omar.luna@linaro.org>2012-09-05 10:56:19 -0500
commite8143bebe69aa225804b14f1722ebdd0e9f4e77e (patch)
tree855c8752f70b366aa27b83ffe1b0709f885b190d
parente7bf51d6fc02b4ef290578e17373077629fd4f6e (diff)
downloadrpmsg-tmp.tar.gz
rpmsg: pass right device paramter to dma_free_coherent functiontmp
dma_alloc/free_coherent APIs requires the platform specific remoteproc device as the device parameter. We are passing vdev->dev.parent to the dma_free_coherent function which is wrong, it has to be vdev->dev.parent->parent instead as in the dma_alloc_coherent function. Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
-rw-r--r--drivers/rpmsg/virtio_rpmsg_bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 590cfafc7c172c..6c1db10b628fc5 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -1008,7 +1008,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
return 0;
free_coherent:
- dma_free_coherent(vdev->dev.parent, RPMSG_TOTAL_BUF_SPACE, bufs_va,
+ dma_free_coherent(vdev->dev.parent->parent, RPMSG_TOTAL_BUF_SPACE, bufs_va,
vrp->bufs_dma);
vqs_del:
vdev->config->del_vqs(vrp->vdev);
@@ -1043,7 +1043,7 @@ static void __devexit rpmsg_remove(struct virtio_device *vdev)
vdev->config->del_vqs(vrp->vdev);
- dma_free_coherent(vdev->dev.parent, RPMSG_TOTAL_BUF_SPACE,
+ dma_free_coherent(vdev->dev.parent->parent, RPMSG_TOTAL_BUF_SPACE,
vrp->rbufs, vrp->bufs_dma);
kfree(vrp);