diff mbox series

[3/3] dmaengine: Encourage dma_request_slave_channel_compat() users to migrate

Message ID 20200203101806.2441-4-peter.ujfalusi@ti.com (mailing list archive)
State Changes Requested
Headers show
Series dmaengine: Stear users towards dma_request_slave_chan() | expand

Commit Message

Peter Ujfalusi Feb. 3, 2020, 10:18 a.m. UTC
Users of dma_request_slave_channel_compat() can be migrated to
dma_request_chan() by correct dma_slave_map for the platform.

Start nagging users in hope that they will move.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 include/linux/dmaengine.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko Feb. 3, 2020, 10:35 a.m. UTC | #1
On Mon, Feb 3, 2020 at 12:32 PM Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:


> +       dev_info(dev, "Please add dma_slave_map entry for %s:%s and migrate to"
> +                " dma_request_chan()", dev_name(dev), name);

Please, don't split string literals.
diff mbox series

Patch

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 4c522bf6ac25..581f6822a7a5 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1547,6 +1547,10 @@  dma_request_slave_channel(struct device *dev, const char *name)
 	return IS_ERR(ch) ? NULL : ch;
 }
 
+/*
+ * Please use dma_request_chan() directly.
+ * Legacy support should use dma_slave_map + dma_request_chan()
+ */
 static inline struct dma_chan
 *dma_request_slave_channel_compat(const dma_cap_mask_t mask,
 				  dma_filter_fn fn, void *fn_param,
@@ -1554,13 +1558,16 @@  static inline struct dma_chan
 {
 	struct dma_chan *chan;
 
-	chan = dma_request_slave_channel(dev, name);
-	if (chan)
+	chan = dma_request_chan(dev, name);
+	if (!IS_ERR(chan))
 		return chan;
 
 	if (!fn || !fn_param)
 		return NULL;
 
+	dev_info(dev, "Please add dma_slave_map entry for %s:%s and migrate to"
+		 " dma_request_chan()", dev_name(dev), name);
+
 	return __dma_request_channel(&mask, fn, fn_param, NULL);
 }