aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmaengine.c16
-rw-r--r--drivers/dma/dmatest.c6
2 files changed, 8 insertions, 14 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);
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 1d6e48f9cd02..c77d47c4ec5b 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -363,12 +363,12 @@ static int dmatest_add_channel(struct dma_chan *chan)
363 return 0; 363 return 0;
364} 364}
365 365
366static enum dma_state_client filter(struct dma_chan *chan, void *param) 366static bool filter(struct dma_chan *chan, void *param)
367{ 367{
368 if (!dmatest_match_channel(chan) || !dmatest_match_device(chan->device)) 368 if (!dmatest_match_channel(chan) || !dmatest_match_device(chan->device))
369 return DMA_DUP; 369 return false;
370 else 370 else
371 return DMA_ACK; 371 return true;
372} 372}
373 373
374static int __init dmatest_init(void) 374static int __init dmatest_init(void)