Re: [PATCH] usb: typec: ucsi: fix ucsi_register_port_psy typo

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

 



On Wed, Apr 29, 2020 at 10:52:04AM +0200, Arnd Bergmann wrote:
> The dummy function in the header file has the wrong name,
> conflicting with a local ucsi_register_port function:
> 
> drivers/usb/typec/ucsi/ucsi.c:890:12: error: conflicting types for 'ucsi_register_port'
>   890 | static int ucsi_register_port(struct ucsi *ucsi, int index)
>       |            ^~~~~~~~~~~~~~~~~~
> In file included from drivers/usb/typec/ucsi/ucsi.c:17:
> drivers/usb/typec/ucsi/ucsi.h:344:19: note: previous definition of 'ucsi_register_port' was here
>   344 | static inline int ucsi_register_port(struct ucsi_connector *con) { return 0; }
>       |                   ^~~~~~~~~~~~~~~~~~
> drivers/usb/typec/ucsi/ucsi.c: In function 'ucsi_register_port':
> drivers/usb/typec/ucsi/ucsi.c:939:8: error: implicit declaration of function 'ucsi_register_port_psy'; did you mean 'ucsi_unregister_port_psy'? [-Werror=implicit-function-declaration]
>   939 |  ret = ucsi_register_port_psy(con);
>       |        ^~~~~~~~~~~~~~~~~~~~~~
>       |        ucsi_unregister_port_psy
> 
> Fixes: 992a60ed0d5e ("usb: typec: ucsi: register with power_supply class")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>  drivers/usb/typec/ucsi/ucsi.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
> index e52b5540b254..cba6f77bea61 100644
> --- a/drivers/usb/typec/ucsi/ucsi.h
> +++ b/drivers/usb/typec/ucsi/ucsi.h
> @@ -341,7 +341,7 @@ int ucsi_resume(struct ucsi *ucsi);
>  int ucsi_register_port_psy(struct ucsi_connector *con);
>  void ucsi_unregister_port_psy(struct ucsi_connector *con);
>  #else
> -static inline int ucsi_register_port(struct ucsi_connector *con) { return 0; }
> +static inline int ucsi_register_port_psy(struct ucsi_connector *con) { return 0; }
>  static inline void ucsi_unregister_port_psy(struct ucsi_connector *con) { }
>  #endif /* CONFIG_POWER_SUPPLY */
>  
> -- 
> 2.26.0
> 

This was sent yesterday and will show up in the next linux-next release,
sorry for the delay.

greg k-h



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

  Powered by Linux