[U-Boot] [PATCH] usb: dwc3: Fix default dr_mode setting

Jean-Jacques Hiblot jjhiblot at ti.com
Thu Jun 27 15:53:44 UTC 2019


The IS_ENABLED() macro requires the complete CONFIG option including the
'CONFIG_' prefix.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
---
To be applied on top of usb/next

 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 9f7f053265..10b3f837f2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 		return -ENOMEM;
 	}
 
-	if (!IS_ENABLED(USB_DWC3_GADGET))
+	if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
 		dwc->dr_mode = USB_DR_MODE_HOST;
 	else if (!IS_ENABLED(CONFIG_USB_HOST))
 		dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
-- 
2.17.1



More information about the U-Boot mailing list