* [PATCH] usb: roles: fix include/linux/usb/role.h compile issue
@ 2022-01-10 10:55 Linyu Yuan
2022-01-10 11:03 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Linyu Yuan @ 2022-01-10 10:55 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan
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(+)
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)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: roles: fix include/linux/usb/role.h compile issue
2022-01-10 10:55 [PATCH] usb: roles: fix include/linux/usb/role.h compile issue Linyu Yuan
@ 2022-01-10 11:03 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-10 11:03 UTC (permalink / raw)
To: Linyu Yuan; +Cc: Felipe Balbi, linux-usb, Jack Pham
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-10 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-10 10:55 [PATCH] usb: roles: fix include/linux/usb/role.h compile issue Linyu Yuan
2022-01-10 11:03 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).