Re: [RFC PATCH] drivers: usb: otg: add device tree support to otg library

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

 



Hi,

On Tue, Jun 26, 2012 at 03:07:24PM +0530, Kishon Vijay Abraham I wrote:
> @@ -154,32 +229,24 @@ EXPORT_SYMBOL(usb_put_phy);
>   */
>  int usb_add_phy(struct usb_phy *x, enum usb_phy_type type)
>  {
> -	int		ret = 0;
>  	unsigned long	flags;
>  	struct usb_phy	*phy;
>  
> -	if (x && x->type != USB_PHY_TYPE_UNDEFINED) {
> -		dev_err(x->dev, "not accepting initialized PHY %s\n", x->label);
> -		return -EINVAL;
> -	}
> +	if (x && x->type != USB_PHY_TYPE_UNDEFINED)
> +		dev_dbg(x->dev, "add a phy with undefined type %s\n", x->label);
>  
>  	spin_lock_irqsave(&phy_lock, flags);
>  
> -	list_for_each_entry(phy, &phy_list, head) {
> -		if (phy->type == type) {
> -			ret = -EBUSY;
> -			dev_err(x->dev, "transceiver type %s already exists\n",
> +	list_for_each_entry(phy, &phy_list, head)
> +		if (phy->type == type)
> +			dev_dbg(x->dev, "transceiver type %s already exists\n",
>  						usb_phy_type_string(type));

if you're getting a phy by phandle, you don't need to care about the
types anymore. In fact, we need to find a way to make this work without
DT too, any ideas ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux