summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ivtv
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2014-11-21 11:57:12 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 11:12:53 +0100
commit872dfcfe82438f5211f5fa1dc6406d033a8a2448 (patch)
treed3a736a51219e493ed94c3ecc203b36168d887fc /drivers/media/pci/ivtv
parent[media] media: vivid: use vb2_ops_wait_prepare/finish helper (diff)
downloadlinux-872dfcfe82438f5211f5fa1dc6406d033a8a2448.tar.xz
linux-872dfcfe82438f5211f5fa1dc6406d033a8a2448.zip
[media] bttv/cx25821/cx88/ivtv: use sg_next instead of sg++
Never use sg++, always use sg = sg_next(sg). Scatterlist entries can be combined if the memory is contiguous but sg++ won't know about that. As far as I can tell cx88 and ivtv are really broken because of this, and bttv and cx25821 are OK because vb1 doesn't combine scatterlist entries. But regardless, sg++ should never be used, only sg_next is safe. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/ivtv')
-rw-r--r--drivers/media/pci/ivtv/ivtv-udma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
index 7338cb2d0a38..bee2329e0b2e 100644
--- a/drivers/media/pci/ivtv/ivtv-udma.c
+++ b/drivers/media/pci/ivtv/ivtv-udma.c
@@ -76,7 +76,7 @@ void ivtv_udma_fill_sg_array (struct ivtv_user_dma *dma, u32 buffer_offset, u32
int i;
struct scatterlist *sg;
- for (i = 0, sg = dma->SGlist; i < dma->SG_length; i++, sg++) {
+ for (i = 0, sg = dma->SGlist; i < dma->SG_length; i++, sg = sg_next(sg)) {
dma->SGarray[i].size = cpu_to_le32(sg_dma_len(sg));
dma->SGarray[i].src = cpu_to_le32(sg_dma_address(sg));
dma->SGarray[i].dst = cpu_to_le32(buffer_offset);