[PATCH] usb: dwc3-generic: Fix build errors when USB_DWC3_GADGET is disabled

Tom Rini trini at konsulko.com
Sun Feb 25 17:05:44 CET 2024


On Sun, Feb 25, 2024 at 03:27:13PM +0000, Jonas Karlman wrote:

> Build fail with the following error when DM_USB_GADGET is enabled and
> USB_DWC3_GADGET is disabled:
> 
>   dwc3/dwc3-generic.o: in function `dm_usb_gadget_handle_interrupts':
>   dwc3/dwc3-generic.c:201:(.text.dm_usb_gadget_handle_interrupts+0x10):
>     undefined reference to `dwc3_gadget_uboot_handle_interrupt'
> 
> Build also fail with the following error when USB_GADGET_DWC2_OTG +
> DM_USB_GADGET is enabled and USB_DWC3_GADGET is disabled:
> 
>   gadget/dwc2_udc_otg.o: in function `dm_usb_gadget_handle_interrupts':
>   gadget/dwc2_udc_otg.c:947: multiple definition of `dm_usb_gadget_handle_interrupts';
>     dwc3/dwc3-generic.o:dwc3/dwc3-generic.c:197: first defined here
> 
> Fix this by checking for USB_DWC3_GADGET in addition to DM_USB_GADGET.
> 
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240225/d895a65d/attachment.sig>


More information about the U-Boot mailing list