OSDN Git Service

USB: dwc2-usb: add USB_GADGET dependency
authorArnd Bergmann <arnd@arndb.de>
Fri, 24 Jun 2016 07:30:26 +0000 (09:30 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 29 Jun 2016 08:11:41 +0000 (11:11 +0300)
The driver selects NOP_USB_XCEIV, which can only be built-in if
USB_GADGET is either disabled or also built-in, so with USB_DWC2_PCI=y
and USB_GADGET=m, NOP_USB_XCEIV is also built-in and we get this link
error:

drivers/usb/built-in.o: In function `nop_set_peripheral':
(text+0x1927c): undefined reference to `usb_gadget_vbus_connect'
drivers/usb/built-in.o: In function `nop_gpio_vbus_thread':
(text+0x197a0): undefined reference to `usb_gadget_vbus_connect'
(text+0x19830): undefined reference to `usb_gadget_vbus_disconnect'

This adds the same dependency for the dwc2 driver to avoid that
broken configuration.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/Kconfig

index c1f29ca..e838701 100644 (file)
@@ -55,6 +55,7 @@ endchoice
 config USB_DWC2_PCI
        tristate "DWC2 PCI"
        depends on PCI
+       depends on USB_GADGET || !USB_GADGET
        default n
        select NOP_USB_XCEIV
        help