Commit a70df146 authored by Alexandre Bailon's avatar Alexandre Bailon Committed by Greg Kroah-Hartman

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: default avatarAlexandre Bailon <abailon@baylibre.com>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 24040a58
...@@ -673,12 +673,15 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller) ...@@ -673,12 +673,15 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
musb_dma->status = MUSB_DMA_STATUS_FREE; musb_dma->status = MUSB_DMA_STATUS_FREE;
musb_dma->max_len = SZ_4M; musb_dma->max_len = SZ_4M;
dc = dma_request_slave_channel(dev->parent, str); dc = dma_request_chan(dev->parent, str);
if (!dc) { if (IS_ERR(dc)) {
dev_err(dev, "Failed to request %s.\n", str); ret = PTR_ERR(dc);
ret = -EPROBE_DEFER; if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to request %s: %d.\n",
str, ret);
goto err; goto err;
} }
cppi41_channel->dc = dc; cppi41_channel->dc = dc;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment