]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: gadget: allow to enable legacy drivers without USB_ETH
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 31 Oct 2017 18:03:19 +0000 (11:03 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 28 Nov 2017 11:05:07 +0000 (13:05 +0200)
Considerable time ago the legacy gadget menu was added inside the
USB_ETH choice. I think this was a mistake and that the legacy
gadget menu should have been added after "endchoice" instead of
before. Hence this patch.

Fixes: commit 8443f2d2b778 ("usb: gadget: Gadget directory cleanup - group legacy gadgets")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/Kconfig
drivers/usb/gadget/legacy/Kconfig

index 31cce7805eb2e93706468409a39f287fdebd5f5a..0a19a76645adee42100e99171570f10c3de3739f 100644 (file)
@@ -508,8 +508,8 @@ choice
          controller, and the relevant drivers for each function declared
          by the device.
 
-source "drivers/usb/gadget/legacy/Kconfig"
-
 endchoice
 
+source "drivers/usb/gadget/legacy/Kconfig"
+
 endif # USB_GADGET
index a12fb459dbd9f6b8fccb06ce4d5fd18084f0b38b..9570bbeced4f86e541a690dfe2112cff12a785c7 100644 (file)
 # both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
 #
 
+menuconfig USB_GADGET_LEGACY
+       bool "Legacy USB Gadget Support"
+       help
+          Legacy USB gadgets are USB gadgets that do not use the USB gadget
+          configfs interface.
+
+if USB_GADGET_LEGACY
+
 config USB_ZERO
        tristate "Gadget Zero (DEVELOPMENT)"
        select USB_LIBCOMPOSITE
@@ -490,3 +498,5 @@ config USB_G_WEBCAM
 
          Say "y" to link the driver statically, or "m" to build a
          dynamically linked module called "g_webcam".
+
+endif