summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/usbhub.c
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2012-11-01 15:44:10 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-07 18:38:37 +0100
commit93ded5905c36d34c4e4f132623c854bbd895b8c9 (patch)
tree242d35c611db91e2351a4e942ff518a66110ca38 /payloads/libpayload/drivers/usb/usbhub.c
parent8670b9b81aba6bf51510e337d4f7208d2b4ea320 (diff)
downloadcoreboot-93ded5905c36d34c4e4f132623c854bbd895b8c9.tar.xz
libpayload: Turn the "debug" #define into the usb_debug static inline function.
The "debug" macro used internally in the libpayload USB subsystem was very generically named and would leak into consumers of the library that included usb.h directly or indirectly. This change turns that #define from a macro into a static inline function to move away from the preprocessor, and also renames it to usb_debug so it's less likely to collide with something unrelated. Change-Id: I18717df111aa9671495f8a2a5bdb2c6311fa7acf Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://review.coreboot.org/1738 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/drivers/usb/usbhub.c')
-rw-r--r--payloads/libpayload/drivers/usb/usbhub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/usbhub.c b/payloads/libpayload/drivers/usb/usbhub.c
index 09ab9ccb29..47215fcf10 100644
--- a/payloads/libpayload/drivers/usb/usbhub.c
+++ b/payloads/libpayload/drivers/usb/usbhub.c
@@ -97,7 +97,7 @@ usb_hub_scanport (usbdev_t *dev, int port)
mdelay(1); timeout--;
} while ((buf[0] & PORT_RESET) && timeout);
if (!timeout)
- debug("Warning: usbhub: port reset timed out.\n");
+ usb_debug("Warning: usbhub: port reset timed out.\n");
/* wait for port to be enabled. the hub is responsible for this */
timeout = 500; /* time out after 500ms */
@@ -106,7 +106,7 @@ usb_hub_scanport (usbdev_t *dev, int port)
mdelay(1); timeout--;
} while (!(buf[0] & PORT_ENABLE) && timeout);
if (!timeout)
- debug("Warning: usbhub: port enabling timed out.\n");
+ usb_debug("Warning: usbhub: port enabling timed out.\n");
get_status (dev, port, DR_PORT, 4, buf);
/* bit 10 9