All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: Compile USB ethernet gadget only if NET is enabled
@ 2023-04-30 21:20 Marek Vasut
  2023-05-01 13:47 ` Tom Rini
  2023-05-04  9:04 ` Lukasz Majewski
  0 siblings, 2 replies; 12+ messages in thread
From: Marek Vasut @ 2023-04-30 21:20 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut, Lukasz Majewski

In case NET networking is not enabled, it is not possible to compile
the USB ethernet gadget. Protect the symbols in Makefile to avoid build
failure. Such build failure may occur e.g. in case NET and USB ethernet
gadget is enabled in U-Boot proper, but not in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Lukasz Majewski <lukma@denx.de>
---
 drivers/usb/gadget/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 6cfe0f3a041..36f65e7eb95 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -34,8 +34,10 @@ endif
 
 obj-$(CONFIG_CI_UDC) += ci_udc.o
 
+ifeq ($(CONFIG_$(SPL_TPL_)NET),y)
 obj-$(CONFIG_USB_ETHER) += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
+endif
 
 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
 # This is really only N900 and USBTTY now.
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-05-04  9:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-30 21:20 [PATCH] usb: gadget: Compile USB ethernet gadget only if NET is enabled Marek Vasut
2023-05-01 13:47 ` Tom Rini
2023-05-01 16:53   ` Marek Vasut
2023-05-01 17:23     ` Tom Rini
2023-05-01 17:40       ` Marek Vasut
2023-05-01 18:53         ` Tom Rini
2023-05-01 20:49           ` Marek Vasut
2023-05-01 21:18             ` Tom Rini
2023-05-03 21:43               ` Marek Vasut
2023-05-03 21:57                 ` Tom Rini
2023-05-04  9:04 ` Lukasz Majewski
2023-05-04  9:17   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.