Re: [PATCH 09/11] usb: chipidea: udc: let phy API return error

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

 



On Tue, May 05, 2015 at 04:14:43PM +0200, Mian Yousaf Kaukab wrote:
> usb_phy_set_power() will check and return error
> 
> Cc: Peter Chen <peter.chen@xxxxxxxxxxxxx>
> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx>
> ---
>  drivers/usb/chipidea/udc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 764f668..07d2e60 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1549,9 +1549,7 @@ static int ci_udc_vbus_draw(struct usb_gadget *_gadget, unsigned ma)
>  {
>  	struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
>  
> -	if (ci->usb_phy)
> -		return usb_phy_set_power(ci->usb_phy, ma);
> -	return -ENOTSUPP;
> +	return usb_phy_set_power(ci->usb_phy, ma);
>  }

It is not the same with current one, if ci->usb_phy is NULL,
current code returns -ENOTSUPP, but this one returns 0;

>  
>  static int ci_udc_selfpowered(struct usb_gadget *_gadget, int is_on)
> -- 
> 2.3.3
> 

-- 

Best Regards,
Peter Chen
--
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