Re: [PATCH] usb: fix build error when USB=m && USB_OTG=y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux