]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Remove non-debug otg_state_string
authorTony Lindgren <tony@atomide.com>
Wed, 19 Sep 2007 19:50:05 +0000 (12:50 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 11 Oct 2007 21:31:33 +0000 (14:31 -0700)
The right state information via sys is good to know, don't try to optimize
it away.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_procfs.c

index 82bf57af4ef6a5e0382de82e193d7301b4924970..b43803602f3c0d5fb5d18099647ce6a2bb5e4bbf 100644 (file)
@@ -121,15 +121,6 @@ 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"
@@ -281,6 +272,26 @@ void musb_load_testpacket(struct musb *musb)
 
 /*-------------------------------------------------------------------------*/
 
+const char *otg_state_string(struct musb *musb)
+{
+       switch (musb->xceiv.state) {
+       case OTG_STATE_A_IDLE:          return "a_idle";
+       case OTG_STATE_A_WAIT_VRISE:    return "a_wait_vrise";
+       case OTG_STATE_A_WAIT_BCON:     return "a_wait_bcon";
+       case OTG_STATE_A_HOST:          return "a_host";
+       case OTG_STATE_A_SUSPEND:       return "a_suspend";
+       case OTG_STATE_A_PERIPHERAL:    return "a_peripheral";
+       case OTG_STATE_A_WAIT_VFALL:    return "a_wait_vfall";
+       case OTG_STATE_A_VBUS_ERR:      return "a_vbus_err";
+       case OTG_STATE_B_IDLE:          return "b_idle";
+       case OTG_STATE_B_SRP_INIT:      return "b_srp_init";
+       case OTG_STATE_B_PERIPHERAL:    return "b_peripheral";
+       case OTG_STATE_B_WAIT_ACON:     return "b_wait_acon";
+       case OTG_STATE_B_HOST:          return "b_host";
+       default:                        return "UNDEFINED";
+       }
+}
+
 #ifdef CONFIG_USB_MUSB_OTG
 
 /*
index ca53d13797d30629c8fecbbbefde7d54da7d14b7..bd282da5b1b8c887f4a00fe6b7f410aaeda1692b 100644 (file)
 
 #include "davinci.h"
 
-
-const char *otg_state_string(struct musb *musb)
-{
-       switch (musb->xceiv.state) {
-       case OTG_STATE_A_IDLE:          return "a_idle";
-       case OTG_STATE_A_WAIT_VRISE:    return "a_wait_vrise";
-       case OTG_STATE_A_WAIT_BCON:     return "a_wait_bcon";
-       case OTG_STATE_A_HOST:          return "a_host";
-       case OTG_STATE_A_SUSPEND:       return "a_suspend";
-       case OTG_STATE_A_PERIPHERAL:    return "a_peripheral";
-       case OTG_STATE_A_WAIT_VFALL:    return "a_wait_vfall";
-       case OTG_STATE_A_VBUS_ERR:      return "a_vbus_err";
-       case OTG_STATE_B_IDLE:          return "b_idle";
-       case OTG_STATE_B_SRP_INIT:      return "b_srp_init";
-       case OTG_STATE_B_PERIPHERAL:    return "b_peripheral";
-       case OTG_STATE_B_WAIT_ACON:     return "b_wait_acon";
-       case OTG_STATE_B_HOST:          return "b_host";
-       default:                        return "UNDEFINED";
-       }
-}
-
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
 
 static int dump_qh(struct musb_qh *qh, char *buf, unsigned max)