From patchwork Wed Nov 23 02:11:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xia Fukun X-Patchwork-Id: 13052928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF3C1C4332F for ; Wed, 23 Nov 2022 02:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiKWCPP (ORCPT ); Tue, 22 Nov 2022 21:15:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234984AbiKWCPF (ORCPT ); Tue, 22 Nov 2022 21:15:05 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F85EB9B99; Tue, 22 Nov 2022 18:15:04 -0800 (PST) Received: from kwepemi500009.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NH4Sn5S6jzRpNh; Wed, 23 Nov 2022 10:14:33 +0800 (CST) Received: from huawei.com (10.67.175.85) by kwepemi500009.china.huawei.com (7.221.188.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 23 Nov 2022 10:15:02 +0800 From: Xia Fukun To: , CC: , , , 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 Message-ID: <20221123021153.205291-1-xiafukun@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.175.85] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500009.china.huawei.com (7.221.188.199) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- 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