usb: Kconfig: let USB_ULPI_BUS depends on USB_COMMON
authorPeter Chen <peter.chen@nxp.com>
Mon, 12 Sep 2016 08:38:46 +0000 (16:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 08:43:38 +0000 (10:43 +0200)
Since ulpi bus driver is located at usb/common/ulpi.c, whether it
is compiled or not depends on CONFIG_USB_COMMON which needs either
USB Host or USB Gadget is enabled, so even CONFIG_USB_ULPI_BUS is
chosen, its source may still not be compiled when both USB HOST
and USB gadget are disabled.

It fixed compile error with below configurations:
- # CONFIG_USB is not set
- # CONFIG_USB_GADGET is not set
- CONFIG_PHY_TUSB1210=m
- CONFIG_USB_ULPI_BUS=m

>> All errors (new ones prefixed by >>):
>>
>> ERROR: "ulpi_unregister_driver" [drivers/phy/phy-tusb1210.ko] undefined!
>> ERROR: "__ulpi_register_driver" [drivers/phy/phy-tusb1210.ko] undefined!
>> ERROR: "ulpi_write" [drivers/phy/phy-tusb1210.ko] undefined!

Fixes: ad764c49f65a ("usb: Kconfig: move ulpi bus support out of host")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/Kconfig

index 6dfa10af71855bd0deae26daa72877e2cf4e4ab1..2b9159a9ab4fc5b93d383dfce67f8e1b9c6e4b7b 100644 (file)
@@ -162,6 +162,7 @@ config USB_LED_TRIG
 
 config USB_ULPI_BUS
        tristate "USB ULPI PHY interface support"
+       depends on USB_COMMON
        help
          UTMI+ Low Pin Interface (ULPI) is specification for a commonly used
          USB 2.0 PHY interface. The ULPI specification defines a standard set
This page took 0.036159 seconds and 5 git commands to generate.