diff mbox series

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

Message ID 1641812126-8284-1-git-send-email-quic_linyyuan@quicinc.com (mailing list archive)
State Superseded
Headers show
Series usb: roles: fix include/linux/usb/role.h compile issue | expand

Commit Message

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

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
 include/linux/usb/role.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Greg Kroah-Hartman Jan. 10, 2022, 11:03 a.m. UTC | #1
On Mon, Jan 10, 2022 at 06:55:26PM +0800, Linyu Yuan wrote:
> when CONFIG_USB_ROLE_SWITCH is not defined,
> add usb_role_switch_find_by_fwnode() definition which return NULL.
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>

What commit does this fix?

thanks,

greg k-h
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)
 {