Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426395

[PATCH v9 02/11] dmaengine: dw: provide probe(), remove() stubs for users

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v9 02/11] dmaengine: dw: provide probe(), remove() stubs for users
Date 2016-06-20 11:30 +0200
Message-ID <rM3GP-6p3-51@gated-at.bofh.it> (permalink)
References <rM3GO-6p3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 include/linux/dma/dw.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/dma/dw.h b/include/linux/dma/dw.h
index f2e538a..ccfd0c3 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;
-- 
2.8.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v9 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-20 11:30 +0200
  [PATCH v9 02/11] dmaengine: dw: provide probe(), remove() stubs for users Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-20 11:30 +0200
  [PATCH v9 09/11] serial: 8250_lpss: move Quark code from PCI driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-20 11:30 +0200
  [PATCH v9 08/11] serial: 8250_lpss: split LPSS driver to separate module Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-20 11:30 +0200
  [PATCH v9 03/11] dmaengine: dw: set polarity of handshake interface Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-20 11:30 +0200
  Re: [PATCH v9 00/11] serial: 8250: split LPSS to 8250_lpss, enable  DMA on Quark Bryan O'Donoghue <pure.logic@nexus-software.ie> - 2016-06-21 17:20 +0200
    Re: [PATCH v9 00/11] serial: 8250: split LPSS to 8250_lpss, enable  DMA on Quark Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-06-21 18:10 +0200

csiph-web