[PATCH 4/8] usb: gadget: Fix Kconfig dependencies

Sascha Hauer sha at pengutronix.de
Tue Jun 28 23:52:51 PDT 2022


On Mon, Jun 27, 2022 at 01:24:56PM +0300, Alexander Shiyan wrote:
> WARNING: unmet direct dependencies detected for SYSTEM_PARTITIONS
> Depends on [n]: GLOBALVAR [=n]
> Selected by [y]:
> - USB_GADGET_AUTOSTART [=y] && USB_GADGET [=y] && USB_GADGET_MASS_STORAGE [=y]
> 
> WARNING: unmet direct dependencies detected for USB_GADGET_DRIVER_ARC_PBL
> Depends on [n]: USB_GADGET [=n]
> Selected by [y]:
> - MACH_PROTONIC_IMX8M [=y] && ARCH_IMX [=y] && IMX_MULTI_BOARDS [=y]
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
> ---
>  drivers/usb/gadget/Kconfig | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 10c713e833..f2ca3695a2 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -4,6 +4,10 @@ menuconfig USB_GADGET
>  	select POLLER
>  	bool "USB gadget support"
>  
> +config USB_GADGET_DRIVER_ARC_PBL
> +	select USB_GADGET
> +	bool

The "select USB_GADGET" is not necessary. The PBL part of that driver
doesn't use anything from USB_GADGET.

> +
>  if USB_GADGET
>  
>  config USB_GADGET_DUALSPEED
> @@ -16,9 +20,6 @@ config USB_GADGET_DRIVER_ARC
>  	default y
>  	select USB_GADGET_DUALSPEED
>  
> -config USB_GADGET_DRIVER_ARC_PBL
> -	bool
> -
>  config USB_GADGET_DRIVER_AT91
>  	bool
>  	prompt "at91 gadget driver"
> @@ -37,6 +38,7 @@ config USB_GADGET_AUTOSTART
>  	bool
>  	default y
>  	prompt "Automatically start usbgadget on boot"
> +	depends on GLOBALVAR

Without GLOBALVAR selected the USB gadget autostart stuff can be
compiled, but without any functionality, as all functionality is
behind globalvars, so adding this dependency mykes sense.

>  	select SYSTEM_PARTITIONS if USB_GADGET_MASS_STORAGE

I am not sure why SYSTEM_PARTITIONS is selected here. Maybe Ahmad can
comment on that. From what I can see with USB_GADGET_AUTOSTART selected
without SYSTEM_PARTITIONS we still get autostart functionality, but
without global.system.partitions support which seems ok.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list