staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device
authorSushmita Susheelendra <ssusheel@codeaurora.org>
Fri, 15 Dec 2017 20:59:13 +0000 (13:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:31:16 +0000 (20:31 +0100)
commit7a3ce39c2bcac61abcb4650b33945335a02ef6cd
tree2fdbb4d8e8a215cadfa7e85daab959c55bc0f831
parent2695c0f1f71e6022a6916584a4d19de8968e97c3
staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device

commit d6b246bb7a29703f53aa4c050b8b3205d749caee upstream.

Use the direction argument passed into begin_cpu_access
and end_cpu_access when calling the dma_sync_sg_for_cpu/device.
The actual cache primitive called depends on the direction
passed in.

Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c