[media] vb2: Fix dma_dir setting for dma-contig mem type
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 13 Feb 2015 07:42:37 +0000 (04:42 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 11:56:26 +0000 (08:56 -0300)
commit4879785ed511083676f27a016c9ad6c46c8e5737
tree950fd9fa766afab16964445b613959b6be4413cd
parenta0f10c131cc49d7d84394beb7903e1f246331224
[media] vb2: Fix dma_dir setting for dma-contig mem type

The last argument of vb2_dc_get_user_pages() is of type enum
dma_data_direction, but the caller, vb2_dc_get_userptr() passes a value
which is the result of comparison dma_dir == DMA_FROM_DEVICE. This results
in the write parameter to get_user_pages() being zero in all cases, i.e.
that the caller has no intent to write there.

This was broken by patch "vb2: replace 'write' by 'dma_dir'".

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: stable@vger.kernel.org # for v3.19
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-dma-contig.c