From 6add051e624e78fe186ab3df7e4d2b87957b4ea0 Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Thu, 10 Mar 2016 17:08:09 +0900 Subject: [PATCH] usb: dwc3: uses #if defined instead of IS_ENABLED This patch uses #if defined macro instead of IS_ENABLED because it's not supported in this u-boot. Change-Id: Ia351ebbb5213b94efaa421711555168ac462b860 Signed-off-by: Chanho Park --- drivers/usb/dwc3/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index ab3c94e51..5e4648185 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -689,10 +689,11 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev) return -ENOMEM; } - if (IS_ENABLED(CONFIG_USB_DWC3_HOST)) - dwc->dr_mode = USB_DR_MODE_HOST; - else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET)) - dwc->dr_mode = USB_DR_MODE_PERIPHERAL; +#if defined(CONFIG_USB_DWC3_HOST) + dwc->dr_mode = USB_DR_MODE_HOST; +#elif defined(CONFIG_USB_DWC3_GADGET) + dwc->dr_mode = USB_DR_MODE_PERIPHERAL; +#endif if (dwc->dr_mode == USB_DR_MODE_UNKNOWN) dwc->dr_mode = USB_DR_MODE_OTG; -- 2.34.1