* [PATCH] i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel()
@ 2019-12-17 7:45 Peter Ujfalusi
2020-03-22 16:23 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2019-12-17 7:45 UTC (permalink / raw)
To: shawnguo, s.hauer; +Cc: vkoul, linux-i2c, linux-arm-kernel, linux-kernel
dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.
By using dma_request_chan() directly the driver can support deferred
probing against DMA.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/i2c/busses/i2c-mxs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 89224913f578..03f5eee9883a 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -836,10 +836,10 @@ static int mxs_i2c_probe(struct platform_device *pdev)
}
/* Setup the DMA */
- i2c->dmach = dma_request_slave_channel(dev, "rx-tx");
- if (!i2c->dmach) {
+ i2c->dmach = dma_request_chan(dev, "rx-tx");
+ if (IS_ERR(i2c->dmach)) {
dev_err(dev, "Failed to request dma\n");
- return -ENODEV;
+ return PTR_ERR(i2c->dmach);
}
platform_set_drvdata(pdev, i2c);
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel()
2019-12-17 7:45 [PATCH] i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
@ 2020-03-22 16:23 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-03-22 16:23 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: shawnguo, s.hauer, vkoul, linux-i2c, linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
On Tue, Dec 17, 2019 at 09:45:05AM +0200, Peter Ujfalusi wrote:
> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
> eating up the error code.
>
> By using dma_request_chan() directly the driver can support deferred
> probing against DMA.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Applied to for-next, thanks!
This driver is looking for a maintainer! Not much work, but still. So,
if someone who reads this is interested, let me know.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-22 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 7:45 [PATCH] i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2020-03-22 16:23 ` Wolfram Sang
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).