diff options
-rw-r--r-- | drivers/dma/dmaengine.c | 16 | ||||
-rw-r--r-- | drivers/dma/dmatest.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 6 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 17 |
4 files changed, 14 insertions, 31 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 | ||
366 | static enum dma_state_client filter(struct dma_chan *chan, void *param) | 366 | static 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 | ||
374 | static int __init dmatest_init(void) | 374 | static 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 |
1547 | static enum dma_state_client filter(struct dma_chan *chan, void *slave) | 1547 | static 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 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index bca2fc758894..1419a5094478 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -29,18 +29,6 @@ | |||
29 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * enum dma_state_client - state of the channel in the client | ||
33 | * @DMA_ACK: client would like to use, or was using this channel | ||
34 | * @DMA_DUP: client has already seen this channel, or is not using this channel | ||
35 | * @DMA_NAK: client does not want to see any more channels | ||
36 | */ | ||
37 | enum dma_state_client { | ||
38 | DMA_ACK, | ||
39 | DMA_DUP, | ||
40 | DMA_NAK, | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * typedef dma_cookie_t - an opaque DMA cookie | 32 | * typedef dma_cookie_t - an opaque DMA cookie |
45 | * | 33 | * |
46 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code | 34 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code |
@@ -160,9 +148,10 @@ void dma_chan_cleanup(struct kref *kref); | |||
160 | * When this optional parameter is specified in a call to dma_request_channel a | 148 | * When this optional parameter is specified in a call to dma_request_channel a |
161 | * suitable channel is passed to this routine for further dispositioning before | 149 | * suitable channel is passed to this routine for further dispositioning before |
162 | * being returned. Where 'suitable' indicates a non-busy channel that | 150 | * being returned. Where 'suitable' indicates a non-busy channel that |
163 | * satisfies the given capability mask. | 151 | * satisfies the given capability mask. It returns 'true' to indicate that the |
152 | * channel is suitable. | ||
164 | */ | 153 | */ |
165 | typedef enum dma_state_client (*dma_filter_fn)(struct dma_chan *chan, void *filter_param); | 154 | typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param); |
166 | 155 | ||
167 | typedef void (*dma_async_tx_callback)(void *dma_async_param); | 156 | typedef void (*dma_async_tx_callback)(void *dma_async_param); |
168 | /** | 157 | /** |