Commit 905e300e1043f5ff513840d342df5c985b3dc08c

Authored by Arnd Bergmann
Committed by Greg Kroah-Hartman
1 parent 46c1cda88c

USB: host: st: fix ehci/ohci driver selection

The newly added sti ehci and ohci drivers come with a single
Kconfig entry that does not depend on either of the base drivers,
which leads to a link error when they are disabled:

drivers/built-in.o: In function `ohci_platform_init':
:(.init.text+0x14788): undefined reference to `ohci_init_driver'

To fix that, this patch introduces two separate Kconfig options
with proper dependencies, which avoids the problem and is also
more consistent with the other glue drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d115837259ada ("usb: host: ohci-st: Add OHCI driver support for ST STB devices")
Cc: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 2 changed files with 20 additions and 9 deletions Side-by-side Diff

drivers/usb/host/Kconfig
... ... @@ -174,6 +174,15 @@
174 174 Enables support for the on-chip EHCI controller on
175 175 ST SPEAr chips.
176 176  
  177 +config USB_EHCI_HCD_STI
  178 + tristate "Support for ST STiHxxx on-chip EHCI USB controller"
  179 + depends on ARCH_STI && OF
  180 + select GENERIC_PHY
  181 + select USB_EHCI_HCD_PLATFORM
  182 + help
  183 + Enable support for the on-chip EHCI controller found on
  184 + STMicroelectronics consumer electronics SoC's.
  185 +
177 186 config USB_EHCI_HCD_AT91
178 187 tristate "Support for Atmel on-chip EHCI USB controller"
179 188 depends on USB_EHCI_HCD && ARCH_AT91
... ... @@ -402,6 +411,15 @@
402 411 Enables support for the on-chip OHCI controller on
403 412 ST SPEAr chips.
404 413  
  414 +config USB_OHCI_HCD_STI
  415 + tristate "Support for ST STiHxxx on-chip OHCI USB controller"
  416 + depends on ARCH_STI && OF
  417 + select GENERIC_PHY
  418 + select USB_OHCI_HCD_PLATFORM
  419 + help
  420 + Enable support for the on-chip OHCI controller found on
  421 + STMicroelectronics consumer electronics SoC's.
  422 +
405 423 config USB_OHCI_HCD_S3C2410
406 424 tristate "OHCI support for Samsung S3C24xx/S3C64xx SoC series"
407 425 depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX)
... ... @@ -760,14 +778,6 @@
760 778 for ehci and ohci.
761 779  
762 780 If unsure, say N.
763   -
764   -config USB_HCD_ST
765   - tristate "ST USB driver for ST SoC Series"
766   - depends on ARCH_STI && OF
767   - select GENERIC_PHY
768   - help
769   - Enable support for the on-chip OHCI & EHCI controller found on
770   - STMicroelectronics consumer electronics SoC's.
771 781  
772 782 config USB_HCD_TEST_MODE
773 783 bool "HCD test mode support"
drivers/usb/host/Makefile
... ... @@ -38,6 +38,7 @@
38 38 obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
39 39 obj-$(CONFIG_USB_EHCI_HCD_ORION) += ehci-orion.o
40 40 obj-$(CONFIG_USB_EHCI_HCD_SPEAR) += ehci-spear.o
  41 +obj-$(CONFIG_USB_EHCI_HCD_ST) += ehci-st.o
41 42 obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o
42 43 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
43 44 obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o
... ... @@ -55,6 +56,7 @@
55 56 obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o
56 57 obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o
57 58 obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o
  59 +obj-$(CONFIG_USB_OHCI_HCD_STI) += ohci-st.o
58 60 obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o
59 61 obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o
60 62 obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o
... ... @@ -77,5 +79,4 @@
77 79 obj-$(CONFIG_USB_FUSBH200_HCD) += fusbh200-hcd.o
78 80 obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o
79 81 obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o
80   -obj-$(CONFIG_USB_HCD_ST) += ehci-st.o ohci-st.o