summaryrefslogtreecommitdiffstats
path: root/include/linux/dma/hsu.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2015-10-13 13:29:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 21:22:08 -0700
commit47f82f1adf701b31d1816bf45118f8e83c02588e (patch)
treecfa82b259b2da64212bc3db66bfd603a04eb1780 /include/linux/dma/hsu.h
parentec2f1b67f526ee0b314103f7bf2846289fa0f435 (diff)
downloadlinux-47f82f1adf701b31d1816bf45118f8e83c02588e.tar.gz
linux-47f82f1adf701b31d1816bf45118f8e83c02588e.tar.bz2
linux-47f82f1adf701b31d1816bf45118f8e83c02588e.zip
dmaengine: hsu: introduce stubs for the exported functions
This allows UART drivers to register HSU DMA Engine without being forced to use ifdefs. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/dma/hsu.h')
-rw-r--r--include/linux/dma/hsu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/dma/hsu.h b/include/linux/dma/hsu.h
index 234393a6997b..765b414eef98 100644
--- a/include/linux/dma/hsu.h
+++ b/include/linux/dma/hsu.h
@@ -38,11 +38,21 @@ struct hsu_dma_chip {
struct hsu_dma_platform_data *pdata;
};
+#if IS_ENABLED(CONFIG_HSU_DMA)
/* Export to the internal users */
irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr);
/* Export to the platform drivers */
int hsu_dma_probe(struct hsu_dma_chip *chip);
int hsu_dma_remove(struct hsu_dma_chip *chip);
+#else
+static inline irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip,
+ unsigned short nr)
+{
+ return IRQ_NONE;
+}
+static inline int hsu_dma_probe(struct hsu_dma_chip *chip) { return -ENODEV; }
+static inline int hsu_dma_remove(struct hsu_dma_chip *chip) { return 0; }
+#endif /* CONFIG_HSU_DMA */
#endif /* _DMA_HSU_H */