Commit f57b407cfd5fbd70251e9fa0ea7aa083ac06d25c

Authored by Rabin Vincent
Committed by Dan Williams
1 parent 3c0f24019f

DMAENGINE: ste_dma40: fix disabled channels list

The value in the array, not the index, specifies the channel to be
disabled.

Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

drivers/dma/ste_dma40.c
... ... @@ -2449,9 +2449,11 @@
2449 2449  
2450 2450 /* Mark disabled channels as occupied */
2451 2451 for (i = 0; base->plat_data->disabled_channels[i] != -1; i++) {
2452   - base->phy_res[i].allocated_src = D40_ALLOC_PHY;
2453   - base->phy_res[i].allocated_dst = D40_ALLOC_PHY;
2454   - num_phy_chans_avail--;
  2452 + int chan = base->plat_data->disabled_channels[i];
  2453 +
  2454 + base->phy_res[chan].allocated_src = D40_ALLOC_PHY;
  2455 + base->phy_res[chan].allocated_dst = D40_ALLOC_PHY;
  2456 + num_phy_chans_avail--;
2455 2457 }
2456 2458  
2457 2459 dev_info(base->dev, "%d of %d physical DMA channels available\n",