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>
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;