From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dan.j.williams@intel.com>
Subject: [PATCH 3/3] dmaengine: Encourage dma_request_slave_channel_compat() users to migrate
Date: Mon, 3 Feb 2020 12:18:06 +0200 [thread overview]
Message-ID: <20200203101806.2441-4-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <20200203101806.2441-1-peter.ujfalusi@ti.com>
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(-)
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);
}
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2020-02-03 10:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 10:18 [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan() Peter Ujfalusi
2020-02-03 10:18 ` [PATCH 1/3] dmaengine: Remove unused define for dma_request_slave_channel_reason() Peter Ujfalusi
2020-02-03 13:35 ` Geert Uytterhoeven
2020-02-03 10:18 ` [PATCH 2/3] dmaengine: Mark dma_request_slave_channel() deprecated Peter Ujfalusi
2020-02-03 10:18 ` Peter Ujfalusi [this message]
2020-02-03 10:35 ` [PATCH 3/3] dmaengine: Encourage dma_request_slave_channel_compat() users to migrate Andy Shevchenko
2020-02-03 10:37 ` [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan() Andy Shevchenko
2020-02-03 10:59 ` Peter Ujfalusi
2020-02-03 11:16 ` Andy Shevchenko
2020-02-03 12:09 ` Peter Ujfalusi
2020-02-03 12:48 ` Andy Shevchenko
2020-02-03 13:32 ` Geert Uytterhoeven
2020-02-03 20:21 ` John Paul Adrian Glaubitz
2020-02-03 20:34 ` Geert Uytterhoeven
2020-02-03 21:26 ` John Paul Adrian Glaubitz
2020-02-04 8:13 ` Geert Uytterhoeven
2020-02-04 6:52 ` Peter Ujfalusi
2020-02-04 8:01 ` Geert Uytterhoeven
2020-02-04 8:15 ` Peter Ujfalusi
2020-02-04 8:21 ` Peter Ujfalusi
2020-02-04 9:16 ` Rob Landley
2020-02-04 9:27 ` Geert Uytterhoeven
2020-02-04 10:18 ` Rob Landley
2020-02-04 6:21 ` Vinod Koul
2020-02-04 11:21 ` Andy Shevchenko
2020-02-05 4:43 ` Vinod Koul
2020-02-05 8:10 ` Peter Ujfalusi
2020-02-05 11:31 ` Vinod Koul
2020-02-05 11:56 ` Peter Ujfalusi
2020-02-05 11:59 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200203101806.2441-4-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).