usb: musb/ux500: Use dma_request_chan() instead dma_request_slave_channel()
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 15 Jan 2020 13:25:40 +0000 (07:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2020 13:46:58 +0000 (14:46 +0100)
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>
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200115132547.364-19-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/ux500_dma.c

index d19bb3e..d5cf5e8 100644 (file)
@@ -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 ?