On Tue, Dec 10, 2013 at 01:10:44PM -0600, Felipe Balbi wrote: > 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 As long as this driver can handle being built as a module successfully, then yes, the patch looks good to me. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html