mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 12:53:27 +00:00
[media] ivtv: use for_each_sg
Use for_each_sg() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
e5c27ef390
commit
acf0e531a4
@ -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 = sg_next(sg)) {
|
||||
for_each_sg(dma->SGlist, sg, dma->SG_length, i) {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user