dmaengine: tegra-apb: Remove duplicated residue calculation
authorJon Hunter <jonathanh@nvidia.com>
Wed, 29 Jun 2016 16:08:38 +0000 (17:08 +0100)
committerVinod Koul <vinod.koul@intel.com>
Thu, 30 Jun 2016 03:23:15 +0000 (08:53 +0530)
commit004f614eded1b5746ef610bbe17eba11e4fb5733
treed7e9ed63b4ceebc66b5b10e5a70d8f60d5325111
parent019bfcc65baa40a36ff0d1af611ecdc27199dad1
dmaengine: tegra-apb: Remove duplicated residue calculation

The calculation of the DMA residue for the Tegra APB DMA is duplicated
in two places in the tegra_dma_tx_status() function. Remove this
duplicated code by moving calculation to the end of the function and
only calculating if we found a valid descriptor.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/tegra20-apb-dma.c