usb: fix building musb drivers
Commit 3dacdf11 "usb: factor out state_string() on otg drivers"
broke building musb drivers since there is already another
otg_state_string() function in musb drivers, but with different
prototype. Fix musb drivers to use common otg_state_string(), too.
Also provide a nop for otg_state_string() if CONFIG_USB_OTG_UTILS
is not defined.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6dfbf9f..3d79919 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1556,7 +1556,8 @@
status = 0;
goto done;
default:
- DBG(2, "Unhandled wake: %s\n", otg_state_string(musb));
+ DBG(2, "Unhandled wake: %s\n",
+ otg_state_string(musb->xceiv->state));
goto done;
}
@@ -2039,7 +2040,7 @@
break;
default:
WARNING("unhandled RESUME transition (%s)\n",
- otg_state_string(musb));
+ otg_state_string(musb->xceiv->state));
}
}
@@ -2069,7 +2070,7 @@
* A_PERIPHERAL may need care too
*/
WARNING("unhandled SUSPEND transition (%s)\n",
- otg_state_string(musb));
+ otg_state_string(musb->xceiv->state));
}
}
@@ -2104,7 +2105,7 @@
default:
#ifdef CONFIG_USB_MUSB_OTG
DBG(2, "Unhandled disconnect %s, setting a_idle\n",
- otg_state_string(musb));
+ otg_state_string(musb->xceiv->state));
musb->xceiv->state = OTG_STATE_A_IDLE;
MUSB_HST_MODE(musb);
break;