aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/usb/ehci_debug.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:07:25 -0600
committerMartin Roth <martinroth@google.com>2017-07-13 23:54:48 +0000
commit32c27c2f850c64cdbf78acd00f0c2ce4b535af64 (patch)
tree02eb0815d631f0f0e4859c3f43c6c81e3253feb1 /src/drivers/usb/ehci_debug.c
parente6ff1596e7417d24746162b3a567bcb6dd9ef988 (diff)
src/drivers: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen in a follow-on commmit. Change-Id: Ib3a1cf04482a8f19b159c31cfb16a7b492748d91 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20352 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/usb/ehci_debug.c')
-rw-r--r--src/drivers/usb/ehci_debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c
index cac043ebef..6fcf683fe6 100644
--- a/src/drivers/usb/ehci_debug.c
+++ b/src/drivers/usb/ehci_debug.c
@@ -33,7 +33,7 @@ struct ehci_debug_info {
struct dbgp_pipe ep_pipe[DBGP_MAX_ENDPOINTS];
};
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static void dbgp_print_data(struct ehci_dbg_port *ehci_debug);
static int dbgp_enabled(void);
# define dprintk(LEVEL, args...) \
@@ -197,7 +197,7 @@ static void dbgp_get_data(struct ehci_dbg_port *ehci_debug, void *buf, int size)
bytes[i] = (hi >> (8*(i - 4))) & 0xff;
}
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static void dbgp_print_data(struct ehci_dbg_port *ehci_debug)
{
u32 ctrl = read32(&ehci_debug->control);
@@ -578,7 +578,7 @@ err:
//return ret;
next_debug_port:
-#if CONFIG_USBDEBUG_DEFAULT_PORT==0
+#if CONFIG_USBDEBUG_DEFAULT_PORT == 0
port_map_tried |= (1 << (debug_port - 1));
new_debug_port = ((debug_port-1 + 1) % n_ports) + 1;
if (port_map_tried != ((1 << n_ports) - 1)) {
@@ -599,7 +599,7 @@ next_debug_port:
return -10;
}
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static int dbgp_enabled(void)
{
struct dbgp_pipe *globals = &dbgp_ehci_info()->ep_pipe[DBGP_SETUP_EP0];