summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx25821/cx25821-cards.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-09-04 15:17:10 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-26 10:34:44 +0200
commitf95fc014e036c06203c0c5d75045e4ac890ef335 (patch)
tree75019c755330afaabc941f582b7ce26fd733209b /drivers/media/pci/cx25821/cx25821-cards.c
parentab11fae0be7a7bcb7aec75c5b081d37ed0a0ed08 (diff)
downloadlinux-f95fc014e036c06203c0c5d75045e4ac890ef335.tar.bz2
media: pci: fix common ALSA DMA-mapping related codes
The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of entries passed to dma_map_sg. The sg_table->nents in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. While touching this code, update it to use the modern DMA_FROM_DEVICE definitions. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci/cx25821/cx25821-cards.c')
0 files changed, 0 insertions, 0 deletions