From 93ded5905c36d34c4e4f132623c854bbd895b8c9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 1 Nov 2012 15:44:10 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/1738 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- payloads/libpayload/drivers/usb/usbhub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'payloads/libpayload/drivers/usb/usbhub.c') 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 -- cgit v1.2.3