aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dma-jz4740.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2014-10-16 11:00:55 +0200
committerVinod Koul <vinod.koul@intel.com>2014-11-06 11:32:44 +0530
commitb2c100e02f666e6b4a73950e2a5badcdf744d4f1 (patch)
tree425d37f3c3356bfb58b1e3f9d9b04b4e28b17318 /drivers/dma/dma-jz4740.c
parentdmaengine: bcm2835: Remove chancnt affectations (diff)
downloadlinux-dev-b2c100e02f666e6b4a73950e2a5badcdf744d4f1.tar.xz
linux-dev-b2c100e02f666e6b4a73950e2a5badcdf744d4f1.zip
dmaengine: jz4740: Remove chancnt affectations
chanctnt is already filled by dma_async_device_register, which uses the channel list to know how much channels there is. Since it's already filled, we can safely remove it from the drivers' probe function. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dma-jz4740.c')
-rw-r--r--drivers/dma/dma-jz4740.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c
index ae2ab14e64b3..44acda0fb39b 100644
--- a/drivers/dma/dma-jz4740.c
+++ b/drivers/dma/dma-jz4740.c
@@ -563,10 +563,9 @@ static int jz4740_dma_probe(struct platform_device *pdev)
dd->device_prep_dma_cyclic = jz4740_dma_prep_dma_cyclic;
dd->device_control = jz4740_dma_control;
dd->dev = &pdev->dev;
- dd->chancnt = JZ_DMA_NR_CHANS;
INIT_LIST_HEAD(&dd->channels);
- for (i = 0; i < dd->chancnt; i++) {
+ for (i = 0; i < JZ_DMA_NR_CHANS; i++) {
chan = &dmadev->chan[i];
chan->id = i;
chan->vchan.desc_free = jz4740_dma_desc_free;