Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71a5e61b authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Greg Kroah-Hartman
Browse files

usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module



Since commit "5e0aa49e usb: chipidea: use generic map/unmap routines",
the udc part of the chipidea driver needs the generic usb gadget helper
functions. If the chipidea driver with udc support is built into the
kernel and usb gadget is built a module, the linking of the kernel
fails with:

drivers/built-in.o: In function `_hardware_dequeue':
drivers/usb/chipidea/udc.c:527:
    undefined reference to `usb_gadget_unmap_request'
drivers/usb/chipidea/udc.c:1269:
    undefined reference to `usb_gadget_unmap_request'
drivers/usb/chipidea/udc.c:1821:
    undefined reference to `usb_del_gadget_udc'
drivers/usb/chipidea/udc.c:443:
    undefined reference to `usb_gadget_map_request'
drivers/usb/chipidea/udc.c:1774:
    undefined reference to `usb_add_gadget_udc'

This patch changes the dependencies, so that udc support can only be
activated if the linux gadget support (USB_GADGET) is builtin or both
chipidea driver and USB_GADGET are modular. Same dependencies for the
chipidea host support and the linux host side USB support (USB).

While there, fix the indention of chipidea the help text.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee6f827d
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
config USB_CHIPIDEA
config USB_CHIPIDEA
	tristate "ChipIdea Highspeed Dual Role Controller"
	tristate "ChipIdea Highspeed Dual Role Controller"
	depends on USB
	depends on USB || USB_GADGET
	help
	help
	  Say Y here if your system has a dual role high speed USB
	  Say Y here if your system has a dual role high speed USB
	  controller based on ChipIdea silicon IP. Currently, only the
	  controller based on ChipIdea silicon IP. Currently, only the
@@ -12,7 +12,7 @@ if USB_CHIPIDEA


config USB_CHIPIDEA_UDC
config USB_CHIPIDEA_UDC
	bool "ChipIdea device controller"
	bool "ChipIdea device controller"
	depends on USB_GADGET
	depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA
	select USB_GADGET_DUALSPEED
	select USB_GADGET_DUALSPEED
	help
	help
	  Say Y here to enable device controller functionality of the
	  Say Y here to enable device controller functionality of the
@@ -20,6 +20,7 @@ config USB_CHIPIDEA_UDC


config USB_CHIPIDEA_HOST
config USB_CHIPIDEA_HOST
	bool "ChipIdea host controller"
	bool "ChipIdea host controller"
	depends on USB=y || USB=USB_CHIPIDEA
	select USB_EHCI_ROOT_HUB_TT
	select USB_EHCI_ROOT_HUB_TT
	help
	help
	  Say Y here to enable host controller functionality of the
	  Say Y here to enable host controller functionality of the