Commit eeb0074f authored by Fernando Guzman Lugo's avatar Fernando Guzman Lugo Committed by Ohad Ben-Cohen

rpmsg: fix dma_free_coherent dev parameter

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 the generic rproc device and it is
wrong, it has to be vdev->dev.parent->parent instead, same as when we
call dma_alloc_coherent function.
Signed-off-by: default avatarFernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
parent 55d512e2
...@@ -1008,8 +1008,8 @@ static int rpmsg_probe(struct virtio_device *vdev) ...@@ -1008,8 +1008,8 @@ static int rpmsg_probe(struct virtio_device *vdev)
return 0; return 0;
free_coherent: 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,
vrp->bufs_dma); bufs_va, vrp->bufs_dma);
vqs_del: vqs_del:
vdev->config->del_vqs(vrp->vdev); vdev->config->del_vqs(vrp->vdev);
free_vrp: free_vrp:
...@@ -1043,7 +1043,7 @@ static void __devexit rpmsg_remove(struct virtio_device *vdev) ...@@ -1043,7 +1043,7 @@ static void __devexit rpmsg_remove(struct virtio_device *vdev)
vdev->config->del_vqs(vrp->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); vrp->rbufs, vrp->bufs_dma);
kfree(vrp); kfree(vrp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment