]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
dmaengine: jz4740: Remove chancnt affectations
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 16 Oct 2014 09:00:55 +0000 (11:00 +0200)
committerVinod Koul <vinod.koul@intel.com>
Thu, 6 Nov 2014 06:02:44 +0000 (11:32 +0530)
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>
drivers/dma/dma-jz4740.c

index ae2ab14e64b30e5edf9119569d379766eba24b94..44acda0fb39befdbdc4b401ffcde2c4a58d1ce67 100644 (file)
@@ -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;