Skip to content

Commit

Permalink
dw-dma: refine the channel_get messages
Browse files Browse the repository at this point in the history
The original messages in channel_get are misleading. Refine the messages
to show the right messages.

Signed-off-by: Libin Yang <libin.yang@intel.com>
  • Loading branch information
libinyang authored and lgirdwood committed Dec 6, 2018
1 parent 04fa66a commit b5d6c71
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/drivers/intel/dw-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,9 @@ static int dw_dma_channel_get(struct dma *dma, int req_chan)
uint32_t flags;
int i;

if (req_chan >= dma->plat_data.channels) {
trace_dwdma_error("dw-dma: %d invalid channel %d",
dma->plat_data.id, req_chan);
return -EINVAL;
}

spin_lock_irq(&dma->lock, flags);

trace_dwdma("dw-dma: %d channel %d request", dma->plat_data.id,
req_chan);
trace_dwdma("dw-dma %d request channel", dma->plat_data.id);

/* find first free non draining channel */
for (i = 0; i < DW_MAX_CHAN; i++) {
Expand All @@ -349,8 +342,7 @@ static int dw_dma_channel_get(struct dma *dma, int req_chan)

/* DMAC has no free channels */
spin_unlock_irq(&dma->lock, flags);
trace_dwdma_error("dw-dma: %d channel %d not free", dma->plat_data.id,
req_chan);
trace_dwdma_error("dw-dma %d no channel is free", dma->plat_data.id);
return -ENODEV;
}

Expand Down

0 comments on commit b5d6c71

Please sign in to comment.