On 11/20/2015 1:38 PM, Bin Liu wrote:
> hi,
> 
> On 11/20/2015 03:35 PM, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Bin Liu <[email protected]> writes:
>>>>>> +enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np);
>>>>>>    bool of_usb_host_tpl_support(struct device_node *np);
>>>>>>    int of_usb_update_otg_caps(struct device_node *np,
>>>>>>                          struct usb_otg_caps *otg_caps);
>>>>>>    #else
>>>>>> +enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
>>>>>> +{
>>>>>> +        return USB_DR_MODE_UNKNOWN;
>>>>>> +}
>>>>>>    static inline bool of_usb_host_tpl_support(struct device_node *np)
>>>>>>    {
>>>>>>          return false;
>>>>>>
>>>>>
>>>>>
>>>>> Hi Felipe,
>>>>>
>>>>> This commit in your testing/next causes compilation error:
>>>>>
>>>>> /home/johnyoun/linux/linux-usb/drivers/usb/common/common.c:143:18: error: 
>>>>> redefinition of ‘of_usb_get_dr_mode_by_phy’
>>>>>    enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
>>>>>                     ^
>>>>> In file included from 
>>>>> /home/johnyoun/linux/linux-usb/drivers/usb/common/common.c:18:0:
>>>>> /home/johnyoun/linux/linux-usb/include/linux/usb/of.h:20:18: note: 
>>>>> previous definition of ‘of_usb_get_dr_mode_by_phy’ was here
>>>>>    enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
>>>>>                     ^
>>>>> make[4]: *** [drivers/usb/common/common.o] Error 1
>>>>>
>>>>>
>>>>
>>>>
>>>> I'm on non-OF config.
>>>>
>>>> Looks like the #ifdef CONFIG_OF should encompass the new function
>>>> in the .c file.
>>>>
>>>
>>> Thanks John for pointing it out.
>>>
>>> Felipe,
>>>
>>> Do you want me to send v6 or you will fix it in your tree?
>>
>> send me an incremental diff which I can meld into original patch.
>>
> 
> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index a11bb15..e6ec125 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -131,6 +131,7 @@ enum usb_dr_mode usb_get_dr_mode(struct device *dev)
>   }
>   EXPORT_SYMBOL_GPL(usb_get_dr_mode);
> 
> +#ifdef CONFIG_OF
>   /**
>    * of_usb_get_dr_mode_by_phy - Get dual role mode for the controller 
> device
>    * which is associated with the given phy device_node
> @@ -171,7 +172,6 @@ finish:
>   }
>   EXPORT_SYMBOL_GPL(of_usb_get_dr_mode_by_phy);
> 
> -#ifdef CONFIG_OF
>   /**
>    * of_usb_host_tpl_support - to get if Targeted Peripheral List is 
> supported
>    * for given targeted hosts (non-PC hosts)
> 
> 


I just tried the same and this fixes it.

Regards,
John

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to