]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/dmaengine.h
[OMAP,sDMA] Fix for possible race condition in omap_free_dma()
[linux-2.6-omap-h63xx.git] / include / linux / dmaengine.h
index 2afc2c95e42df99070a255ca2b294d84de0d7d6e..2e2aa3df170cfb5f2be5f8097ee9e2324c759143 100644 (file)
@@ -202,6 +202,7 @@ struct dma_async_tx_descriptor {
 /**
  * struct dma_device - info on the entity supplying DMA services
  * @chancnt: how many DMA channels are supported
+ * @privatecnt: how many DMA channels are requested by dma_request_channel
  * @channels: the list of struct dma_chan
  * @global_node: list_head for global dma_device_list
  * @cap_mask: one or more dma_capability flags
@@ -224,6 +225,7 @@ struct dma_async_tx_descriptor {
 struct dma_device {
 
        unsigned int chancnt;
+       unsigned int privatecnt;
        struct list_head channels;
        struct list_head global_node;
        dma_cap_mask_t  cap_mask;
@@ -352,6 +354,13 @@ __dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
        set_bit(tx_type, dstp->bits);
 }
 
+#define dma_cap_clear(tx, mask) __dma_cap_clear((tx), &(mask))
+static inline void
+__dma_cap_clear(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
+{
+       clear_bit(tx_type, dstp->bits);
+}
+
 #define dma_cap_zero(mask) __dma_cap_zero(&(mask))
 static inline void __dma_cap_zero(dma_cap_mask_t *dstp)
 {