Re: [PATCH] USB: musb: defer probe if transceiver is not ready

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

 



On Wed, Nov 21, 2012 at 08:39:27PM +0800, Ming Lei wrote:
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 774d815..ef57a60 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1881,8 +1881,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
>  	 * isp1504, non-OTG, etc) mostly hooking up through ULPI.
>  	 */
>  	status = musb_platform_init(musb);
> -	if (status < 0)
> +	if (status < 0) {
> +		/* try to defer probe if trasceiver is not ready */
> +		status = -EPROBE_DEFER;

Hmm. You basically turn every possible error into EPROBE_DEFER. What about
replacing the ENODEV with EPROBE_DEFER? I would make a little larger patch but
-ENOMEM or -EINVAL remains -ENOMEM or -EINVAL.

>  		goto fail1;
> +	}
>  
>  	if (!musb->isr) {
>  		status = -ENODEV;

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux