All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xia Fukun <xiafukun@huawei.com>
To: <linus.walleij@linaro.org>, <gregkh@linuxfoundation.org>
Cc: <renzhijie2@huawei.com>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <xiafukun@huawei.com>
Subject: [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m
Date: Wed, 23 Nov 2022 10:11:53 +0800	[thread overview]
Message-ID: <20221123021153.205291-1-xiafukun@huawei.com> (raw)

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


             reply	other threads:[~2022-11-23  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  2:11 Xia Fukun [this message]
2022-11-23 21:18 ` [PATCH -next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123021153.205291-1-xiafukun@huawei.com \
    --to=xiafukun@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=renzhijie2@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.