]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
DMAENGINE: define a dummy filter function for ste_dma40
authorLinus Walleij <linus.walleij@stericsson.com>
Wed, 6 Oct 2010 09:05:29 +0000 (09:05 +0000)
committerDan Williams <dan.j.williams@intel.com>
Thu, 7 Oct 2010 21:56:36 +0000 (14:56 -0700)
All platform data has to be made conditional on CONFIG_STEDMA40
or we can provide a simple dummy filter functions as to avoid
cluttering the code with other #ifdef:s.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
arch/arm/plat-nomadik/include/plat/ste_dma40.h

index 660552d33b3a8ceec5dff30faacd97a50a72b7d3..3dd42551de0419bdac34a195ed95ffc17465ac65 100644 (file)
@@ -162,6 +162,8 @@ struct stedma40_platform_data {
        int                              disabled_channels[STEDMA40_MAX_PHYS];
 };
 
+#ifdef CONFIG_STE_DMA40
+
 /**
  * stedma40_filter() - Provides stedma40_chan_cfg to the
  * ste_dma40 dma driver via the dmaengine framework.
@@ -223,4 +225,21 @@ dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
                                                  direction, flags);
 }
 
+#else
+static inline bool stedma40_filter(struct dma_chan *chan, void *data)
+{
+       return false;
+}
+
+static inline struct
+dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
+                                           dma_addr_t addr,
+                                           unsigned int size,
+                                           enum dma_data_direction direction,
+                                           unsigned long flags)
+{
+       return NULL;
+}
+#endif
+
 #endif