diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-01-06 11:38:19 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-01-06 11:38:19 -0700 |
commit | 7dd602510128d7a64b11ff3b7d4f30ac8e3946ce (patch) | |
tree | 6a87f942c72b0b02d24db7144cad435211178fcc /drivers/dma | |
parent | f27c580c3628d79b17f38976d842a6d7f3616e2e (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/dma')
-rw-r--r-- | drivers/dma/dmaengine.c | 16 | ||||
-rw-r--r-- | drivers/dma/dmatest.c | 6 |
2 files changed, 8 insertions, 14 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index b245c38dbec..cdc8ecfc2c2 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 { struct dma_device *device, *_d; struct dma_chan *chan = NULL; - enum dma_state_client ack; + bool ack; int err; /* Find a channel */ @@ -453,9 +453,9 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v if (fn) ack = fn(chan, fn_param); else - ack = DMA_ACK; + ack = true; - if (ack == DMA_ACK) { + if (ack) { /* Found a suitable channel, try to grab, prep, and * return it. We first set DMA_PRIVATE to disable * 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 dev_name(&chan->dev), err); else break; - } else if (ack == DMA_DUP) { - pr_debug("%s: %s filter said DMA_DUP\n", - __func__, dev_name(&chan->dev)); - } else if (ack == DMA_NAK) { - pr_debug("%s: %s filter said DMA_NAK\n", - __func__, dev_name(&chan->dev)); - break; } else - WARN_ONCE(1, "filter_fn: unknown response?\n"); + pr_debug("%s: %s filter said false\n", + __func__, dev_name(&chan->dev)); chan = NULL; } mutex_unlock(&dma_list_mutex); diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 1d6e48f9cd0..c77d47c4ec5 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -363,12 +363,12 @@ static int dmatest_add_channel(struct dma_chan *chan) return 0; } -static enum dma_state_client filter(struct dma_chan *chan, void *param) +static bool filter(struct dma_chan *chan, void *param) { if (!dmatest_match_channel(chan) || !dmatest_match_device(chan->device)) - return DMA_DUP; + return false; else - return DMA_ACK; + return true; } static int __init dmatest_init(void) |