diff mbox series

[v2] usb: roles: fix include/linux/usb/role.h compile issue

Message ID 1641818608-25039-1-git-send-email-quic_linyyuan@quicinc.com (mailing list archive)
State Accepted
Commit 945c37ed564770c78dfe6b9f08bed57a1b4e60ef
Headers show
Series [v2] usb: roles: fix include/linux/usb/role.h compile issue | expand

Commit Message

Linyu Yuan Jan. 10, 2022, 12:43 p.m. UTC
when CONFIG_USB_ROLE_SWITCH is not defined,
add usb_role_switch_find_by_fwnode() definition which return NULL.

Fixes: c6919d5e0cd1 ("usb: roles: Add usb_role_switch_find_by_fwnode()")
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v2: add Fixes tag

 include/linux/usb/role.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/usb/role.h b/include/linux/usb/role.h
index 031f148..b5deafd 100644
--- a/include/linux/usb/role.h
+++ b/include/linux/usb/role.h
@@ -92,6 +92,12 @@  fwnode_usb_role_switch_get(struct fwnode_handle *node)
 static inline void usb_role_switch_put(struct usb_role_switch *sw) { }
 
 static inline struct usb_role_switch *
+usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode)
+{
+	return NULL;
+}
+
+static inline struct usb_role_switch *
 usb_role_switch_register(struct device *parent,
 			 const struct usb_role_switch_desc *desc)
 {