diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-08-17 19:20:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 17:13:29 +0300 |
commit | 19d82910c07173872bd2869f0077e290a7a466a6 (patch) | |
tree | 396c93fc9d356cf8f2fa648aac12ab6917cc9ab1 /include/linux/dma | |
parent | 5fb23e35cacffb7b99ed5b97a002ddb8c9144bb6 (diff) | |
download | linux-19d82910c07173872bd2869f0077e290a7a466a6.tar.xz |
dmaengine: dw: provide probe(), remove() stubs for users
Some users consider DMA optional, thus when driver is not compiled we shouldn't
prevent compilation of the users. Add stubs for dw_dma_probe() and
dw_dma_remove().
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/dma')
-rw-r--r-- | include/linux/dma/dw.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dma/dw.h b/include/linux/dma/dw.h index f2e538aaddad..ccfd0c3777df 100644 --- a/include/linux/dma/dw.h +++ b/include/linux/dma/dw.h @@ -40,8 +40,13 @@ struct dw_dma_chip { }; /* Export to the platform drivers */ +#if IS_ENABLED(CONFIG_DW_DMAC_CORE) int dw_dma_probe(struct dw_dma_chip *chip); int dw_dma_remove(struct dw_dma_chip *chip); +#else +static inline int dw_dma_probe(struct dw_dma_chip *chip) { return -ENODEV; } +static inline int dw_dma_remove(struct dw_dma_chip *chip) { return 0; } +#endif /* CONFIG_DW_DMAC_CORE */ /* DMA API extensions */ struct dw_desc; |