projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e783362
)
usb: roles: fix include/linux/usb/role.h compile issue
author
Linyu Yuan
<quic_linyyuan@quicinc.com>
Mon, 10 Jan 2022 12:43:28 +0000
(20:43 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 17:30:15 +0000
(18:30 +0100)
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>
include/linux/usb/role.h
patch
|
blob
|
history
diff --git
a/include/linux/usb/role.h
b/include/linux/usb/role.h
index 031f148ab37349d2f6c10841498cdf300d7dcd78..b5deafd91f67bb58f04c4c9189bf37b1fcfe28f1 100644
(file)
--- a/
include/linux/usb/role.h
+++ b/
include/linux/usb/role.h
@@
-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 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)