Commit fdb8df99 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Vinod Koul

dmaengine: Add dma_get_slave_caps() inline stub when !CONFIG_DMA_ENGINE

Commit 0d5484b1 ("dmaengine: Move dma_get_slave_caps()
implementation to dmaengine.c") turned the inline dma_get_slave_caps()
function into an external function without adding an inline stub for the
cases where CONFIG_DMA_ENGINE isn't set. This breaks compilation of
drivers using the DMA engine API when CONFIG_DMA_ENGINE isn't set.

Add an inline stub to fix compilation.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fixes: 0d5484b1 ("dmaengine: Move dma_get_slave_caps() implementation to dmaengine.c")
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 4d76bbed
...@@ -758,8 +758,6 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( ...@@ -758,8 +758,6 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg(
src_sg, src_nents, flags); src_sg, src_nents, flags);
} }
int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
static inline int dmaengine_terminate_all(struct dma_chan *chan) static inline int dmaengine_terminate_all(struct dma_chan *chan)
{ {
if (chan->device->device_terminate_all) if (chan->device->device_terminate_all)
...@@ -1048,6 +1046,7 @@ struct dma_chan *dma_request_slave_channel_reason(struct device *dev, ...@@ -1048,6 +1046,7 @@ struct dma_chan *dma_request_slave_channel_reason(struct device *dev,
const char *name); const char *name);
struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name);
void dma_release_channel(struct dma_chan *chan); void dma_release_channel(struct dma_chan *chan);
int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
#else #else
static inline struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type) static inline struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
{ {
...@@ -1082,6 +1081,11 @@ static inline struct dma_chan *dma_request_slave_channel(struct device *dev, ...@@ -1082,6 +1081,11 @@ static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
static inline void dma_release_channel(struct dma_chan *chan) static inline void dma_release_channel(struct dma_chan *chan)
{ {
} }
static inline int dma_get_slave_caps(struct dma_chan *chan,
struct dma_slave_caps *caps)
{
return -ENXIO;
}
#endif #endif
/* --- DMA device --- */ /* --- DMA device --- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment