Signed-off-by: Sven Schwermer
---
common/usb.c | 14 +++---
common/usb_hub.c | 16
common/usb_kbd.c | 4 ++--
common/usb_storage.c | 6 +++---
drivers/usb/dwc3/core.c | 2 +-
drivers/usb/dwc3/core.h | 2 +-
drivers/usb/eth/usb_ether.c | 2 +-
drivers/usb/gadget/ci_udc.c | 2 +-
drivers/usb/gadget/ether.c| 8
drivers/usb/host/dwc2.c | 12 ++--
drivers/usb/host/ehci-atmel.c | 2 +-
drivers/usb/host/ehci-fsl.c | 12 ++--
drivers/usb/host/ehci-hcd.c | 12 ++--
drivers/usb/host/ehci-marvell.c | 4 ++--
drivers/usb/host/ehci-mx6.c | 2 +-
drivers/usb/host/ehci-pci.c | 8
drivers/usb/host/ehci-vf.c| 2 +-
drivers/usb/host/ohci-hcd.c | 10 +-
drivers/usb/host/ohci.h | 4 ++--
drivers/usb/host/xhci-dwc3.c | 2 +-
drivers/usb/host/xhci-fsl.c | 4 ++--
drivers/usb/host/xhci-mem.c | 6 +++---
drivers/usb/host/xhci.c | 12 ++--
drivers/usb/host/xhci.h | 2 +-
drivers/usb/musb-new/musb_uboot.c | 12 ++--
drivers/usb/musb-new/omap2430.c | 4 ++--
drivers/usb/musb-new/ti-musb.c| 4 ++--
drivers/usb/musb-new/usb-compat.h | 2 +-
include/usb.h | 12 ++--
29 files changed, 92 insertions(+), 92 deletions(-)
diff --git a/common/usb.c b/common/usb.c
index 78178c54c8..b70f614d24 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -42,7 +42,7 @@
static int asynch_allowed;
char usb_started; /* flag for the started/stopped USB status */
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
static struct usb_device usb_dev[USB_MAX_DEVICE];
static int dev_index;
@@ -183,7 +183,7 @@ int usb_disable_asynch(int disable)
asynch_allowed = !disable;
return old_value;
}
-#endif /* !CONFIG_DM_USB */
+#endif /* !CONFIG_IS_ENABLED(DM_USB) */
/*---
@@ -849,7 +849,7 @@ int usb_string(struct usb_device *dev, int index, char
*buf, size_t size)
* the USB device are static allocated [USB_MAX_DEVICE].
*/
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
/* returns a pointer to the device with the index [index].
* if the device is not assigned (dev->devnum==-1) returns NULL
@@ -906,7 +906,7 @@ __weak int usb_alloc_device(struct usb_device *udev)
{
return 0;
}
-#endif /* !CONFIG_DM_USB */
+#endif /* !CONFIG_IS_ENABLED(DM_USB) */
static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub)
{
@@ -1166,7 +1166,7 @@ int usb_setup_device(struct usb_device *dev, bool do_read,
return ret;
}
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
/*
* By the time we get here, the device has gotten a new device ID
* and is in the default state. We need to identify the thing and
@@ -1215,14 +1215,14 @@ int board_usb_cleanup(int index, enum usb_init_type
init)
bool usb_device_has_child_on_port(struct usb_device *parent, int port)
{
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
return false;
#else
return parent->children[port] != NULL;
#endif
}
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
void usb_find_usb2_hub_address_port(struct usb_device *udev,
uint8_t *hub_address, uint8_t *hub_port)
{
diff --git a/common/usb_hub.c b/common/usb_hub.c
index e1d93b8333..33aaeb8e44 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -64,7 +64,7 @@ static inline bool usb_hub_is_superspeed(struct usb_device
*hdev)
return hdev->descriptor.bDeviceProtocol == 3;
}
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
bool usb_hub_is_root_hub(struct udevice *hub)
{
if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB)
@@ -125,7 +125,7 @@ int usb_get_port_status(struct usb_device *dev, int port,
void *data)
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port,
data, sizeof(struct usb_port_status), USB_CNTL_TIMEOUT);
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
if (ret < 0)
return ret;
@@ -209,7 +209,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
max(100, (int)pgood_delay) + 1000);
}
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
static struct usb_hub_device hub_dev[USB_MAX_HUB];
static int usb_hub_index;
@@ -273,7 +273,7 @@ static int usb_hub_port_reset(struct usb_device *dev, int
port,
unsigned short portstatus, portchange;
int delay = HUB_SHORT_RESET_TIME; /* start with short reset delay */
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
debug("%s: resetting '%s' port %d...\n", __func__, dev->dev->name,
port + 1);
#else
@@ -394,7 +394,7 @@ int usb_hub_port_connect_change(struct usb_device *dev, int
port)