All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: ucsi: fix ucsi_register_port_psy typo
@ 2020-04-29  8:52 Arnd Bergmann
  2020-04-29  9:31 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-04-29  8:52 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, K V, Abhilash
  Cc: Arnd Bergmann, Guenter Roeck, Ajay Gupta, linux-usb, linux-kernel

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@arndb.de>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-29  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  8:52 [PATCH] usb: typec: ucsi: fix ucsi_register_port_psy typo Arnd Bergmann
2020-04-29  9:31 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.