Skip to content

Commit

Permalink
DMAENGINE: ste_dma40: fix disabled channels list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rabin Vincent authored and Dan Williams committed Oct 7, 2010
1 parent 3c0f240 commit f57b407
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,9 +2449,11 @@ static int __init d40_phy_res_init(struct d40_base *base)

/* Mark disabled channels as occupied */
for (i = 0; base->plat_data->disabled_channels[i] != -1; i++) {
base->phy_res[i].allocated_src = D40_ALLOC_PHY;
base->phy_res[i].allocated_dst = D40_ALLOC_PHY;
num_phy_chans_avail--;
int chan = base->plat_data->disabled_channels[i];

base->phy_res[chan].allocated_src = D40_ALLOC_PHY;
base->phy_res[chan].allocated_dst = D40_ALLOC_PHY;
num_phy_chans_avail--;
}

dev_info(base->dev, "%d of %d physical DMA channels available\n",
Expand Down

0 comments on commit f57b407

Please sign in to comment.