diff options
author | Alexandre Bailon <abailon@baylibre.com> | 2017-06-16 10:40:54 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-20 11:45:01 +0800 |
commit | a70df14602b33f645d1eb69aad536ec29457a006 (patch) | |
tree | a4edc22112bf7019f470649fbdffac492df1c7b3 /drivers/usb/musb | |
parent | 24040a58379e2f2fa6aa9466911b758073b6bdfa (diff) | |
download | linux-stable-a70df14602b33f645d1eb69aad536ec29457a006.tar.gz linux-stable-a70df14602b33f645d1eb69aad536ec29457a006.tar.bz2 linux-stable-a70df14602b33f645d1eb69aad536ec29457a006.zip |
usb: musb: musb_cppi41: Defer probe only if DMA is not ready
If dma_request_slave_channel() failed to return a channel,
then the driver will print an error and request to defer probe,
regardless of the cause of the failure.
Defer if the DMA is not ready yet otherwise print an error.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_cppi41.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index e7c8b1b8bf22..ba255280a624 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -673,12 +673,15 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller) musb_dma->status = MUSB_DMA_STATUS_FREE; musb_dma->max_len = SZ_4M; - dc = dma_request_slave_channel(dev->parent, str); - if (!dc) { - dev_err(dev, "Failed to request %s.\n", str); - ret = -EPROBE_DEFER; + dc = dma_request_chan(dev->parent, str); + if (IS_ERR(dc)) { + ret = PTR_ERR(dc); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to request %s: %d.\n", + str, ret); goto err; } + cppi41_channel->dc = dc; } return 0; |