/*
* imxdma_sg_next - prepare next chunk for scatter-gather DMA emulation
*/
-static inline int imxdma_sg_next(struct imxdma_desc *d, struct scatterlist *sg)
+static inline int imxdma_sg_next(struct imxdma_desc *d)
{
struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
+ struct scatterlist *sg = d->sg;
unsigned long now;
now = min(d->len, sg->length);
d->sg = sg_next(d->sg);
if (d->sg) {
u32 tmp;
- imxdma_sg_next(d, d->sg);
+ imxdma_sg_next(d);
tmp = imx_dmav1_readl(DMA_CCR(channel));
imx_dmav1_writel(tmp | CCR_RPT | CCR_ACRPT,
DMA_CCR(channel));
desc->sg = sg_next(desc->sg);
if (desc->sg) {
- imxdma_sg_next(desc, desc->sg);
+ imxdma_sg_next(desc);
tmp = imx_dmav1_readl(DMA_CCR(chno));
return -EINVAL;
}
- imxdma_sg_next(d, d->sg);
+ imxdma_sg_next(d);
break;
default: