mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m
@ 2022-11-23  2:11 Xia Fukun
  2022-11-23 21:18 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Xia Fukun @ 2022-11-23  2:11 UTC (permalink / raw)
  To: linus.walleij, gregkh; +Cc: renzhijie2, linux-usb, linux-kernel, xiafukun

The combination of CONFIG_USB_FOTG210_UDC=y and
CONFIG_USB_GADGET=m results in the following error:

drivers/usb/fotg210/fotg210-udc.o: In function `fotg210_done':
fotg210-udc.c:(.text+0x75b): undefined reference to
`usb_gadget_giveback_request'
drivers/usb/fotg210/fotg210-udc.o: In function `fotg210_irq':
fotg210-udc.c:(.text+0x1586): undefined reference to `usb_gadget_udc_reset'
drivers/usb/fotg210/fotg210-udc.o: In function `fotg210_udc_remove':
fotg210-udc.c:(.text+0x179a): undefined reference to `usb_del_gadget_udc'
drivers/usb/fotg210/fotg210-udc.o: In function `fotg210_udc_probe':
fotg210-udc.c:(.text+0x19ed): undefined reference to
`usb_ep_set_maxpacket_limit'
fotg210-udc.c:(.text+0x1a11): undefined reference to
`usb_ep_set_maxpacket_limit'
fotg210-udc.c:(.text+0x1ace): undefined reference to `usb_add_gadget_udc'
fotg210-udc.c:(.text+0x1b74): undefined reference to
`usb_ep_set_maxpacket_limit'
make[1]: *** [vmlinux] Error 1
make: *** [vmlinux] Error 2
make: *** Waiting for unfinished jobs....

Make USB_FOTG210_UDC depends on USB_GADGET=y to fix this.

Fixes: 1dd33a9f1b95 ("usb: fotg210: Collect pieces of dual mode controller")
Signed-off-by: Xia Fukun <xiafukun@huawei.com>
---
 drivers/usb/fotg210/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/fotg210/Kconfig b/drivers/usb/fotg210/Kconfig
index 534206ee0d1d..bc07c7fc8998 100644
--- a/drivers/usb/fotg210/Kconfig
+++ b/drivers/usb/fotg210/Kconfig
@@ -24,7 +24,7 @@ config USB_FOTG210_HCD
 	  module will be called fotg210-hcd.
 
 config USB_FOTG210_UDC
-	depends on USB_GADGET
+	depends on USB_GADGET = y
 	bool "Faraday FOTG210 USB Peripheral Controller support"
 	help
 	   Faraday USB2.0 OTG controller which can be configured as
-- 
2.17.1


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

* Re: [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m
  2022-11-23  2:11 [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m Xia Fukun
@ 2022-11-23 21:18 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2022-11-23 21:18 UTC (permalink / raw)
  To: Xia Fukun; +Cc: gregkh, renzhijie2, linux-usb, linux-kernel

Hi Xia,

thanks for your patch!

On Wed, Nov 23, 2022 at 3:15 AM Xia Fukun <xiafukun@huawei.com> wrote:

> The combination of CONFIG_USB_FOTG210_UDC=y and
> CONFIG_USB_GADGET=m results in the following error:
(...)
> Make USB_FOTG210_UDC depends on USB_GADGET=y to fix this.
>
> Fixes: 1dd33a9f1b95 ("usb: fotg210: Collect pieces of dual mode controller")
> Signed-off-by: Xia Fukun <xiafukun@huawei.com>

Isn't this patch that Greg already merged fixing this issue
more thoroughly?
https://lore.kernel.org/linux-usb/20221111144821.113665-1-linus.walleij@linaro.org/

Please have a look & test!

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-11-23 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23  2:11 [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m Xia Fukun
2022-11-23 21:18 ` Linus Walleij

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

all inboxes | Powered by JetHome®