diff mbox series

usb: musb/ux500: Use dma_request_chan() instead dma_request_slave_channel()

Message ID 20191217110030.26887-1-peter.ujfalusi@ti.com (mailing list archive)
State Mainlined
Commit b7962fb45f8fe0678b2d2eaa48382ea32fcf9400
Headers show
Series usb: musb/ux500: Use dma_request_chan() instead dma_request_slave_channel() | expand

Commit Message

Peter Ujfalusi Dec. 17, 2019, 11 a.m. UTC
dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/usb/musb/ux500_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bin Liu Dec. 17, 2019, 6:51 p.m. UTC | #1
On Tue, Dec 17, 2019 at 01:00:30PM +0200, Peter Ujfalusi wrote:
> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
> eating up the error code.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---

Applied. Thanks.

-Bin.
diff mbox series

Patch

diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index d19bb3e89da6..d5cf5e8bb1ca 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -310,9 +310,9 @@  static int ux500_dma_controller_start(struct ux500_dma_controller *controller)
 			dma_channel->max_len = SZ_16M;
 
 			ux500_channel->dma_chan =
-				dma_request_slave_channel(dev, chan_names[ch_num]);
+				dma_request_chan(dev, chan_names[ch_num]);
 
-			if (!ux500_channel->dma_chan)
+			if (IS_ERR(ux500_channel->dma_chan))
 				ux500_channel->dma_chan =
 					dma_request_channel(mask,
 							    data ?