summaryrefslogtreecommitdiff
path: root/drivers/dma/edma.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-01-11 10:38:01 +0200
committerVinod Koul <vinod.koul@intel.com>2016-01-13 19:09:25 +0530
commitd20313b2c407a90fb60eca99d73c47a75bb42e08 (patch)
tree961beb7501b0848da9c3fb2f073419ae94020418 /drivers/dma/edma.c
parent8b648436eb45c1f561164b24aafd35fb2bee9cfc (diff)
dmaengine: edma: Fix paRAM slot allocation for entry channel 0
edma_alloc_slot was not checking the channel mapping support existence when slot 0 has been requested (used as entry slot for channel/event 0). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/edma.c')
-rw-r--r--drivers/dma/edma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 6b3e9d991010..bdb9339a91c7 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -484,7 +484,7 @@ static void edma_read_slot(struct edma_cc *ecc, unsigned slot,
*/
static int edma_alloc_slot(struct edma_cc *ecc, int slot)
{
- if (slot > 0) {
+ if (slot >= 0) {
slot = EDMA_CHAN_SLOT(slot);
/* Requesting entry paRAM slot for a HW triggered channel. */
if (ecc->chmap_exist && slot < ecc->num_channels)