dmaengine: sprd: Fix the last link-list configuration
authorEric Long <eric.long@spreadtrum.com>
Tue, 6 Nov 2018 05:01:33 +0000 (13:01 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Dec 2018 08:57:11 +0000 (14:27 +0530)
commit13e8997924a0df7f0136d742aa829b791889d3ce
treebce9d4a8157e6b529c5859fff7c97b5883d9ddf8
parentd762ab33ccd03e8c1ad50b814d2deccec15b8c28
dmaengine: sprd: Fix the last link-list configuration

We will pass sglen as 0 configure the last link-list configuration
when filling the descriptor, which will cause the incorrect link-list
configuration. Thus we should check if the sglen is 0 to configure
the correct link-list configuration.

Signed-off-by: Eric Long <eric.long@spreadtrum.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sprd-dma.c