summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2012-10-26 23:35:15 +0900
committerVinod Koul <vinod.koul@intel.com>2013-01-07 22:04:53 -0800
commite5a087fdc1ebe5bba40bcecb53c28a0af70e3b47 (patch)
tree729413f91a92c1ce3a98fffa273363a17ff44666 /include
parente63a47a361e03eaf79e0f2f6cdaca8e7679d1867 (diff)
downloadlinux-stable-e5a087fdc1ebe5bba40bcecb53c28a0af70e3b47.tar.gz
linux-stable-e5a087fdc1ebe5bba40bcecb53c28a0af70e3b47.tar.bz2
linux-stable-e5a087fdc1ebe5bba40bcecb53c28a0af70e3b47.zip
dmaengine: use for_each_set_bit
Use for_each_set_bit() to implement for_each_dma_cap_mask() and remove unused first_dma_cap() and next_dma_cap(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Dan Williams <djbw@fb.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmaengine.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c88f302d91c9..4c8643794e0d 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -849,20 +849,6 @@ static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
}
-#define first_dma_cap(mask) __first_dma_cap(&(mask))
-static inline int __first_dma_cap(const dma_cap_mask_t *srcp)
-{
- return min_t(int, DMA_TX_TYPE_END,
- find_first_bit(srcp->bits, DMA_TX_TYPE_END));
-}
-
-#define next_dma_cap(n, mask) __next_dma_cap((n), &(mask))
-static inline int __next_dma_cap(int n, const dma_cap_mask_t *srcp)
-{
- return min_t(int, DMA_TX_TYPE_END,
- find_next_bit(srcp->bits, DMA_TX_TYPE_END, n+1));
-}
-
#define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask))
static inline void
__dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
@@ -891,9 +877,7 @@ __dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp)
}
#define for_each_dma_cap_mask(cap, mask) \
- for ((cap) = first_dma_cap(mask); \
- (cap) < DMA_TX_TYPE_END; \
- (cap) = next_dma_cap((cap), (mask)))
+ for_each_set_bit(cap, mask.bits, DMA_TX_TYPE_END)
/**
* dma_async_issue_pending - flush pending transactions to HW