On Mon, Dec 09, 2013 at 09:09:10PM -0800, Greg KH wrote: > On Mon, Dec 09, 2013 at 03:41:41PM -0600, Felipe Balbi wrote: > > when any driver using usb_bus_start_enum() is > > enabled in a build with CONFIG_USB=m, we will > > have a build error because of usb_bus_start_enum() > > will be compiled into a module (usbcore) and > > the driver (phy-fsm-usb.c or phy-isp1301-omap.c) > > will be statically linked to the kernel. > > > > The easiest fix in this situation is to move the > > definition of usb_bus_start_enum() to usb-common.c > > (since it can be used by both host or gadget roles), > > and make that a boolean config option, instead of > > tristate. > > > > This is another example where usage of 'select' > > creates problems. > > > > Cc: <stable@xxxxxxxxxxxxxxx> > > Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> > > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > > --- > > > > I was originally against hiding CONFIG_USB_OTG (and > > CONFIG_USB_PHY for that matter) for this specific reason. > > > > When people rely on select to enable things they want, > > there's a rather high probability of some dependencies > > getting messed up and linux-next having build problems. > > > > Greg, let me know if this patch is acceptable for you -rc > > cycle, note that it fixes a build error with allmodconfig, > > possibly in any arch. > > > > drivers/usb/Kconfig | 2 +- > > drivers/usb/core/hcd.c | 41 ----------------------------------------- > > drivers/usb/usb-common.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 45 insertions(+), 42 deletions(-) > > > > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig > > index 2642b8a..42d9970b 100644 > > --- a/drivers/usb/Kconfig > > +++ b/drivers/usb/Kconfig > > @@ -40,7 +40,7 @@ menuconfig USB_SUPPORT > > if USB_SUPPORT > > > > config USB_COMMON > > - tristate > > + bool > > Ick, no, I really don't want to do this. How about we fix up the > callers of this function to not allow them to be built in (i.e. don't do > a "select") but be a "depends on" instead. fair enough, how about this instead ? diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 08e2f39..2b41c63 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -19,8 +19,9 @@ config AB8500_USB in host mode, low speed. config FSL_USB2_OTG - bool "Freescale USB OTG Transceiver Driver" + tristate "Freescale USB OTG Transceiver Driver" depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME + depends on USB select USB_OTG select USB_PHY help @@ -29,6 +30,7 @@ config FSL_USB2_OTG config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG + depends on USB select USB_PHY help If you say yes here you get support for the Philips ISP1301 -- balbi
Attachment:
signature.asc
Description: Digital signature