aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:19 -0500
committerDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:19 -0500
commit7dd602510128d7a64b11ff3b7d4f30ac8e3946ce (patch)
tree6a87f942c72b0b02d24db7144cad435211178fcc /drivers
parentf27c580c3628d79b17f38976d842a6d7f3616e2e (diff)
dmaengine: kill enum dma_state_client
DMA_NAK is now useless. We can just use a bool instead. Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/dmaengine.c16
-rw-r--r--drivers/dma/dmatest.c6
-rw-r--r--drivers/mmc/host/atmel-mci.c6
3 files changed, 11 insertions, 17 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)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 4b567a0408e1..b0042d06eaf7 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1544,14 +1544,14 @@ static void __exit atmci_cleanup_slot(struct atmel_mci_slot *slot,
1544} 1544}
1545 1545
1546#ifdef CONFIG_MMC_ATMELMCI_DMA 1546#ifdef CONFIG_MMC_ATMELMCI_DMA
1547static enum dma_state_client filter(struct dma_chan *chan, void *slave) 1547static bool filter(struct dma_chan *chan, void *slave)
1548{ 1548{
1549 struct dw_dma_slave *dws = slave; 1549 struct dw_dma_slave *dws = slave;
1550 1550
1551 if (dws->dma_dev == chan->device->dev) 1551 if (dws->dma_dev == chan->device->dev)
1552 return DMA_ACK; 1552 return true;
1553 else 1553 else
1554 return DMA_DUP; 1554 return false;
1555} 1555}
1556#endif 1556#endif
1557 1557