Re: [PATCH v2] usb: musb: musb_cppi41: Update an error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 05, 2017 at 07:52:33AM -0500, Alexandre Bailon wrote:
> 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.
> Only defer if the DMA is not ready yet and print an error to explain
> that we are deferring probe.
> 
> Signed-off-by: Alexandre Bailon <abailon@xxxxxxxxxxxx>

Applied. Thanks.
-Bin.

> ---
>  drivers/usb/musb/musb_cppi41.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index e7c8b1b..4718d0d 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
> @@ -673,10 +673,12 @@ 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);
> +			dev_err(dev, "Failed to request %s%s.\n", str,
> +				ret == -EPROBE_DEFER
> +				? ", deferring probe" : "");
>  			goto err;
>  		}
>  		cppi41_channel->dc = dc;
> -- 
> 2.10.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux