Commit 945c37ed authored by Linyu Yuan's avatar Linyu Yuan Committed by Greg Kroah-Hartman

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: c6919d5e ("usb: roles: Add usb_role_switch_find_by_fwnode()")
Signed-off-by: default avatarLinyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1641818608-25039-1-git-send-email-quic_linyyuan@quicinc.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e783362e
...@@ -91,6 +91,12 @@ fwnode_usb_role_switch_get(struct fwnode_handle *node) ...@@ -91,6 +91,12 @@ fwnode_usb_role_switch_get(struct fwnode_handle *node)
static inline void usb_role_switch_put(struct usb_role_switch *sw) { } 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 * static inline struct usb_role_switch *
usb_role_switch_register(struct device *parent, usb_role_switch_register(struct device *parent,
const struct usb_role_switch_desc *desc) const struct usb_role_switch_desc *desc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment