From: David Brownell Date: Thu, 18 Jan 2007 19:40:42 +0000 (-0800) Subject: musb_hdrc, otg_state_string tweak X-Git-Tag: v2.6.21-omap1~156 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6ca364735d1ce810af0cea59839d67314c946f3b;p=linux-2.6-omap-h63xx.git musb_hdrc, otg_state_string tweak This provides a trivial definition of otg_state_string() for use in various WARNING() messages when debugging is not enabled. Signed-off-by: David Brownell --- diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 196558a6f12..d98c4bcd85b 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -122,6 +122,15 @@ module_param(debug, uint, 0); MODULE_PARM_DESC(debug, "initial debug message level"); #define MUSB_VERSION_SUFFIX "/dbg" +#else + +const char *otg_state_string(struct musb *musb) +{ + static char buf[8]; + + snprintf(buf, sizeof buf, "otg-%d", musb->xceiv.state); + return buf; +} #endif #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"