From patchwork Mon Dec 11 11:30:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 121370 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2669872qgn; Mon, 11 Dec 2017 03:31:08 -0800 (PST) X-Google-Smtp-Source: ACJfBoubLlh2/XLQl4zadQaoEML8kEFr+4mSDkIrxo2LWxvdVIcVw2vKsr27GnGSDFR88ZtGSOEE X-Received: by 10.84.234.136 with SMTP id n8mr41174plk.387.1512991868710; Mon, 11 Dec 2017 03:31:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512991868; cv=none; d=google.com; s=arc-20160816; b=P9mt+E/ZZ+tUvdureolD8WqV+BpWNAab6FYMZ2ulKJY8DfHoSQqAvt+gmognO9U3d2 vz00ZHxJ6FB7pZmySzPi6yAweqWmdrBD5jMXkQf38wqS9gEq0rJSsAzCQHivK6MhS4fP Wx1DlFmnKyutMEHq1q0mYqAW5A/GYtgMmcH9nYvmi7HOqRyjOTbU6QvVjeqNzpncEuYk yW5frQ2LEDxZ3rxCtiD2Pmh7nLSzA+a6SrQkNBGtsikfGZef+s8UrQE33zpTazEiZjU8 WkppaZxLw2ZeL8aOVDem6lOonQlFxkrz3pohI1n7BiU+GL10J7PmUYa5Itaepj37xRsV c3dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lv4wdRvz7b0LUpIM5QkIBZW0v4UiYFoFqvnTQ+YR9zc=; b=yfnTwTvc9YQfVpIIGwsr3s0+qBvzX1DwfHJWJCBfsntb8ROJ0bG03h7c1KKlGJ2gUo akiiA9LcRLJjLnmZENb21TdN6LidBEJrF8MDwCyjsKk77CYvuOlYHEnYvrhDWdYsUF2B d/WviDDZ5NAOZdpt4pZ4SUZYHGKf7j+jQoHU0AH838lQXrxeEB+1UlQypznhVemZS8Ui XQY1w6RfRybqgf41F8z+CQbh4aiGeXkvZmVyHG5V4S86EyPv6R4d0GOVc7jRhLhBNSjs 7t63qtNACIvKjFmiLjpYy/hx6BT7k0wxBq3eIbp5D6ZjElSRLNmoP/oOenTmZPr9lXoX Bd+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si9757430pgo.486.2017.12.11.03.31.08; Mon, 11 Dec 2017 03:31:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752470AbdLKLbF (ORCPT + 3 others); Mon, 11 Dec 2017 06:31:05 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:62793 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdLKLbE (ORCPT ); Mon, 11 Dec 2017 06:31:04 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0M5ZBQ-1fHQtG0Y9Y-00xe1A; Mon, 11 Dec 2017 12:30:50 +0100 From: Arnd Bergmann To: Felipe Balbi , Greg Kroah-Hartman Cc: linux-media@vger.kernel.org, Arnd Bergmann , Ruslan Bilovol , Romain Izard , Mauro Carvalho Chehab , Hannes Reinecke , Thadeu Lima de Souza Cascardo , Bart Van Assche , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] usb: gadget: restore tristate-choice for legacy gadgets Date: Mon, 11 Dec 2017 12:30:13 +0100 Message-Id: <20171211113048.3514863-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:zznJTVgl7Y8Y7CFE7asJ/yN1feWUp3KoaJens91cnMbkChUdK3Q EHImDuwQgBRHZWWL1Xq2b+Ls3BSxzCLASRcce9W4gJWO6HdeIuvFUlXJTb4tbpTVugfUzAf Y3Mp6VnlEbTLqvXEY2ddupzCvBBKl35v7x+vDMOxlfHe8IZ+1IcG2uLwN8Rw+wIynpld2rX P2Jb7EI8Oa+JDySOEjspA== X-UI-Out-Filterresults: notjunk:1; V01:K0:hJphVZZ7AOM=:ZFE6CvY8uD9TmfhTSsMPAj P6Sd5fSBSUBXhk7bC++bSTLaJcaac8MPmp8WXFSVNm7TkUTQH0Nofg3jFZMvsq7lrRhKMDXFq 2SG4UnFUpHjbWpV1FfTq5PU7kYyXKJ9PQT8yHaUkBbefd9ZwGkLQo/fDtyrsiJMBqYopMVbiF KsGfUJZbRt7k38i2RD3IUHPaz37oYaLCS7PbhjMiWepsmiwLtVxySct2PgnYDDhj0JtTxs2AN OF4YYBCeGJxzc41Tt9lBiVhjdT5pLoE4fsHLyN7ca8VLKH41rgqVGIZ9i0R1cotcbSdNQcpBl 4rFFg+IZ9LdUs+EkHWXoPpZM6fVWfz0Imbcu4VGjQvt5t09M670ifa15Gs3Il50NeDTh4EpNm hjyVbenRH57m2T6cFD7PTvYZfhU58a9rK1di7aQJNfSeVVdHWLGIqbS4Q11hh5MztUE+wvR8L MtrL10DKla0QZM1QVpWYy0dJEs7U8dmwtf9YIZs4FrKNsNDj6alaCW4j9CWcQwnf0N8RjpwLu vQLELIpEhZltJGQy1/U3sJOP+TQBaSbMxBEYmHy0yzlegA1Qa5c958/t/1TamLAuM+Umf4yxe a72QkmY8zAeNM3ecLJnbPVyNm3x1GSFPueFInHDkTA/c4iA56K47ZpTp3Dqq76X8ybTsKXQzo 9lNxzNjujuqa6ElhLitpfXjWvY/BNq5njvhQCfBR+4d7ZRpmaCT0ZY4nBOQLaQyH5L1CzmXpV lVRTjQBZbf9o5UOQjDzTEaKE7ma3gnRQ6N8g4Q== Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org One patch that was meant as a cleanup apparently did more than it intended, allowing all combinations of legacy gadget drivers to be built into the kernel, and leaving an empty 'choice' statement behind: drivers/usb/gadget/Kconfig:487:warning: choice default symbol 'USB_ETH' is not contained in the choice The description of commit 7a9618a22aad ("usb: gadget: allow to enable legacy drivers without USB_ETH") was a bit cryptic, as it did not change the behavior of USB_ETH other than allowing it to be built into the kernel alongside other legacy gadgets, which is not a valid configuration. As Felipe explained in the description for commit bc49d1d17dcf ("usb: gadget: don't couple configfs to legacy gadgets"), the configfs based gadgets can be freely configured as loadable modules or built-in drivers, but the legacy gadgets can only be modules if there is more than one of them, so we require the 'choice' statement here. This leaves the added USB_GADGET_LEGACY menuconfig symbol in place, but then restores the 'choice' below it, so we can enforce the single-legacy-gadget rule as before. Fixes: 7a9618a22aad ("usb: gadget: allow to enable legacy drivers without USB_ETH") Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/Kconfig | 28 ---------------------------- drivers/usb/gadget/legacy/Kconfig | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 28 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 0a19a76645ad..eab61f552c19 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -482,34 +482,6 @@ config USB_CONFIGFS_F_TCM Both protocols can work on USB2.0 and USB3.0. UAS utilizes the USB 3.0 feature called streams support. -choice - tristate "USB Gadget precomposed configurations" - default USB_ETH - optional - help - A Linux "Gadget Driver" talks to the USB Peripheral Controller - driver through the abstract "gadget" API. Some other operating - systems call these "client" drivers, of which "class drivers" - are a subset (implementing a USB device class specification). - A gadget driver implements one or more USB functions using - the peripheral hardware. - - Gadget drivers are hardware-neutral, or "platform independent", - except that they sometimes must understand quirks or limitations - of the particular controllers they work with. For example, when - a controller doesn't support alternate configurations or provide - enough of the right types of endpoints, the gadget driver might - not be able work with that controller, or might need to implement - a less common variant of a device class protocol. - - The available choices each represent a single precomposed USB - gadget configuration. In the device model, each option contains - both the device instantiation as a child for a USB gadget - controller, and the relevant drivers for each function declared - by the device. - -endchoice - source "drivers/usb/gadget/legacy/Kconfig" endif # USB_GADGET diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig index 9570bbeced4f..2d80a9d1d5d9 100644 --- a/drivers/usb/gadget/legacy/Kconfig +++ b/drivers/usb/gadget/legacy/Kconfig @@ -21,6 +21,32 @@ menuconfig USB_GADGET_LEGACY if USB_GADGET_LEGACY +choice + tristate "USB Gadget precomposed configurations" + default USB_ETH + optional + help + A Linux "Gadget Driver" talks to the USB Peripheral Controller + driver through the abstract "gadget" API. Some other operating + systems call these "client" drivers, of which "class drivers" + are a subset (implementing a USB device class specification). + A gadget driver implements one or more USB functions using + the peripheral hardware. + + Gadget drivers are hardware-neutral, or "platform independent", + except that they sometimes must understand quirks or limitations + of the particular controllers they work with. For example, when + a controller doesn't support alternate configurations or provide + enough of the right types of endpoints, the gadget driver might + not be able work with that controller, or might need to implement + a less common variant of a device class protocol. + + The available choices each represent a single precomposed USB + gadget configuration. In the device model, each option contains + both the device instantiation as a child for a USB gadget + controller, and the relevant drivers for each function declared + by the device. + config USB_ZERO tristate "Gadget Zero (DEVELOPMENT)" select USB_LIBCOMPOSITE @@ -499,4 +525,6 @@ config USB_G_WEBCAM Say "y" to link the driver statically, or "m" to build a dynamically linked module called "g_webcam". +endchoice + endif