aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index b245c38dbec3..cdc8ecfc2c2c 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -440,7 +440,7 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
440{ 440{
441 struct dma_device *device, *_d; 441 struct dma_device *device, *_d;
442 struct dma_chan *chan = NULL; 442 struct dma_chan *chan = NULL;
443 enum dma_state_client ack; 443 bool ack;
444 int err; 444 int err;
445 445
446 /* Find a channel */ 446 /* Find a channel */
@@ -453,9 +453,9 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
453 if (fn) 453 if (fn)
454 ack = fn(chan, fn_param); 454 ack = fn(chan, fn_param);
455 else 455 else
456 ack = DMA_ACK; 456 ack = true;
457 457
458 if (ack == DMA_ACK) { 458 if (ack) {
459 /* Found a suitable channel, try to grab, prep, and 459 /* Found a suitable channel, try to grab, prep, and
460 * return it. We first set DMA_PRIVATE to disable 460 * return it. We first set DMA_PRIVATE to disable
461 * balance_ref_count as this channel will not be 461 * balance_ref_count as this channel will not be
@@ -473,15 +473,9 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
473 dev_name(&chan->dev), err); 473 dev_name(&chan->dev), err);
474 else 474 else
475 break; 475 break;
476 } else if (ack == DMA_DUP) {
477 pr_debug("%s: %s filter said DMA_DUP\n",
478 __func__, dev_name(&chan->dev));
479 } else if (ack == DMA_NAK) {
480 pr_debug("%s: %s filter said DMA_NAK\n",
481 __func__, dev_name(&chan->dev));
482 break;
483 } else 476 } else
484 WARN_ONCE(1, "filter_fn: unknown response?\n"); 477 pr_debug("%s: %s filter said false\n",
478 __func__, dev_name(&chan->dev));
485 chan = NULL; 479 chan = NULL;
486 } 480 }
487 mutex_unlock(&dma_list_mutex); 481 mutex_unlock(&dma_list_mutex);