diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2015-10-13 06:29:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 00:22:08 -0400 |
commit | 47f82f1adf701b31d1816bf45118f8e83c02588e (patch) | |
tree | cfa82b259b2da64212bc3db66bfd603a04eb1780 | |
parent | ec2f1b67f526ee0b314103f7bf2846289fa0f435 (diff) |
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>
-rw-r--r-- | include/linux/dma/hsu.h | 10 |
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 { | |||
38 | struct hsu_dma_platform_data *pdata; | 38 | struct hsu_dma_platform_data *pdata; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | #if IS_ENABLED(CONFIG_HSU_DMA) | ||
41 | /* Export to the internal users */ | 42 | /* Export to the internal users */ |
42 | irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr); | 43 | irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr); |
43 | 44 | ||
44 | /* Export to the platform drivers */ | 45 | /* Export to the platform drivers */ |
45 | int hsu_dma_probe(struct hsu_dma_chip *chip); | 46 | int hsu_dma_probe(struct hsu_dma_chip *chip); |
46 | int hsu_dma_remove(struct hsu_dma_chip *chip); | 47 | int hsu_dma_remove(struct hsu_dma_chip *chip); |
48 | #else | ||
49 | static inline irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, | ||
50 | unsigned short nr) | ||
51 | { | ||
52 | return IRQ_NONE; | ||
53 | } | ||
54 | static inline int hsu_dma_probe(struct hsu_dma_chip *chip) { return -ENODEV; } | ||
55 | static inline int hsu_dma_remove(struct hsu_dma_chip *chip) { return 0; } | ||
56 | #endif /* CONFIG_HSU_DMA */ | ||
47 | 57 | ||
48 | #endif /* _DMA_HSU_H */ | 58 | #endif /* _DMA_HSU_H */ |