aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:15 -0500
committerDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:15 -0500
commit33df8ca068123457db56c316946a3c0e4ef787d6 (patch)
treee594340e903ea3eb8af83906c649eeaf85cbc0b2 /include/linux
parent59b5ec21446b9239d706ab237fb261d525b75e81 (diff)
dmatest: convert to dma_request_channel
Replace the client registration infrastructure with a custom loop to poll for channels. Once dma_request_channel returns NULL stop asking for channels. A userspace side effect of this change if that loading the dmatest module before loading a dma driver will result in no channels being found, previously dmatest would get a callback. To facilitate testing in the built-in case dmatest_init is marked as a late_initcall. Another side effect is that channels under test can not be used for any other purpose. Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dmaengine.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index fe40bc020af6..6f2d070ac7f3 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -400,6 +400,12 @@ __dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
400 set_bit(tx_type, dstp->bits); 400 set_bit(tx_type, dstp->bits);
401} 401}
402 402
403#define dma_cap_zero(mask) __dma_cap_zero(&(mask))
404static inline void __dma_cap_zero(dma_cap_mask_t *dstp)
405{
406 bitmap_zero(dstp->bits, DMA_TX_TYPE_END);
407}
408
403#define dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask)) 409#define dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask))
404static inline int 410static inline int
405__dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp) 411__dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp)