summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinyu Yuan <quic_linyyuan@quicinc.com>2022-01-10 13:43:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-25 18:30:15 +0100
commit945c37ed564770c78dfe6b9f08bed57a1b4e60ef (patch)
tree355684aabd9a310bc9821374ada0b64bf22ac0d6 /include
parentLinux 5.17-rc1 (diff)
downloadlinux-945c37ed564770c78dfe6b9f08bed57a1b4e60ef.tar.xz
linux-945c37ed564770c78dfe6b9f08bed57a1b4e60ef.zip
usb: roles: fix include/linux/usb/role.h compile issue
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> Link: https://lore.kernel.org/r/1641818608-25039-1-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/role.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/role.h b/include/linux/usb/role.h
index 031f148ab373..b5deafd91f67 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)
{