Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6731891rwb; Tue, 22 Nov 2022 18:31:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf6c4dCOushQp3ZGGMeoyTnqkIBJEKJ0JT7pK+AixK4u15hfCm8NNTDLzR8wlFMGUaKAUmaf X-Received: by 2002:a17:906:3ad6:b0:7ae:40b7:7fbe with SMTP id z22-20020a1709063ad600b007ae40b77fbemr21045849ejd.371.1669170699144; Tue, 22 Nov 2022 18:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669170699; cv=none; d=google.com; s=arc-20160816; b=lHT2u8soeJd1N3OLU2qGGuStomx6+y4wjC3kGJXbF9Zss8UVjokyY22YdRk76c4wYp 09M5ivXcWCcn2P6DAOUrmZqk0SuOYqCVkDD/5qsL5aRdcLaX3htfyGkY1zwvWy/TlHmo fudyKStom7Yun9AKXizQ6JYxtWTNYn15R6f13I6csUTKeXrmaGCxkPtsIcBTY/hVA2RG Gi8t4tNtDwjtcW1EDG+YP9b3EmoduQcCR2XCPZMNMn9TwQ2NaVg3ISwIAiti5Xxhqca7 smSBXN68S2Zn3swvbtS/07gwN4nPkb1tjQWa/bW3XT7Qq0vhVwOwNfLReojKHD2kOfka eEWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=gOzrQ/ZzGCFiijX9ePafHZddQDKeHDeB8vHAqbSOja4=; b=zO67NXHlTp12IfKnHjUlZzKKE04/T7RZYqoc6eWgmR2ByyfzS0Wzyd5GUhC4YHny6r 9giWNKB0vkLv8z84D968Ptlo5lnxTlEWK0Oeev12q5deX0B3yNxWN5fqa4TKs9HcC/7g fqJ/7WkXfTbLrBsGl5MM0fY9nGt7uwPdmv388A7hT9WV9SU2NF+E/BbtpQDPHswYObCS 4QxssYrB3k2mxB/lurFEpLijdIpKeKgyqIUE73SjzfICq0Fs7omoSpRJKMECVZkOJsQc xJr7rdHd/EBdjmMnKYEaYPoNrCMflhaOcgddB7nrAII2dQdJ4cBv0wLLHYtbNMvheYjN nm2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb44-20020a170907162c00b007b2b5ab155esi10007998ejc.363.2022.11.22.18.31.17; Tue, 22 Nov 2022 18:31:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235439AbiKWCPQ (ORCPT + 89 others); Tue, 22 Nov 2022 21:15:16 -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 Content-Type: text/plain 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.17.1