From 6ca364735d1ce810af0cea59839d67314c946f3b Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 18 Jan 2007 11:40:42 -0800 Subject: [PATCH] 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 --- drivers/usb/musb/plat_uds.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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" -- 2.41.1