[-next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m
Message ID | 20221123021153.205291-1-xiafukun@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2548243wrr; Tue, 22 Nov 2022 18:18:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf6REv8Rq41TOHNkiPifGXzJOrcYu1XdI0MJQlK8t1v8QWjXbR6ULgEXiBtc7nH0opNnU7LV X-Received: by 2002:a17:906:fcc2:b0:78d:8b75:b161 with SMTP id qx2-20020a170906fcc200b0078d8b75b161mr22715741ejb.385.1669169890958; Tue, 22 Nov 2022 18:18:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669169890; cv=none; d=google.com; s=arc-20160816; b=vo5A2N1MixTxjtIxVxL+mIadk3SrJrJ9wgy0hiAd0BGhj2sRT2NxbOk9ahSUvXqqHI 29qwVSRSFLloYKQte4k9ABD4kyxsT1hdfkiRLhAWN38oHPFHg5QCy2iGdx18JMS+ZknO skY0xJ04Un9Nm9cJnx47Ev0opdmQNaEgHNVrq4ogSmTNuIEKag5r4uZ4MLWcqJ4LpNu2 8zadO4WcF91kNtyCGmtdQNolk6S59xUQaDt+tUPM72Wn8bYEwl2VtkePm03I0z207Rsy E5yZefRZHX5kcez40Bkn14+SwVwcOvHLM9gn4IlXsIwxzD0XKyJb08XUeEkrpRmVfs8q fHBQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a056402268200b00468eee7250csi1902229edd.510.2022.11.22.18.17.47; Tue, 22 Nov 2022 18:18:10 -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 <rfc822;cjcooper78@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750251487620747020?= X-GMAIL-MSGID: =?utf-8?q?1750251487620747020?= |
Series |
[-next] usb: fotg210: Fix build error when CONFIG_USB_FOTG210_UDC=y && CONFIG_USB_GADGET=m
|
|
Commit Message
Xia Fukun
Nov. 23, 2022, 2:11 a.m. UTC
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(-)
Comments
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
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