public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] usb: dwc3: include extcon.h to fix compile error
@ 2022-05-10  8:20 Guan Jing
  2022-05-10  8:28 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Guan Jing @ 2022-05-10  8:20 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, Guan Jing

If dwc3 is not include extcon.h, the dwc3 driver
will fail to link:

drivers/usb/dwc3/core.o: In function `dwc3_probe':
core.c:(.text+0x1095): undefined reference to `extcon_get_edev_by_phandle'
core.c:(.text+0x10bd): undefined reference to `extcon_get_extcon_dev'

Add miss #include <linux/extcon.h> to fix this error.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guan Jing <guanjing6@huawei.com>
---
 drivers/usb/dwc3/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 950e238c65bf..ea7259443283 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -33,6 +33,7 @@
 #include <linux/usb/gadget.h>
 #include <linux/usb/of.h>
 #include <linux/usb/otg.h>
+#include <linux/extcon.h>
 
 #include "core.h"
 #include "gadget.h"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-12  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-10  8:20 [PATCH -next] usb: dwc3: include extcon.h to fix compile error Guan Jing
2022-05-10  8:28 ` Greg KH
2022-05-11  2:05   ` guanjing (D)
2022-05-12  7:37     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox