diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 15:24:15 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-13 15:52:54 +0400 |
commit | d445b6da8da491e025eb60576ce959f6a3a56a4f (patch) | |
tree | 06bf3afc86c3c6248a9c2d980cf359bdb008447e /drivers/usb/musb/musb_virthub.c | |
parent | 76eb57ec1bf3201d2f417cafa5c974e7c0b6aaf9 (diff) | |
download | linux-d445b6da8da491e025eb60576ce959f6a3a56a4f.tar.xz |
usb: musb: Start using struct usb_otg
Use struct usb_otg members with OTG specific functions instead
of usb_phy members.
[ balbi@ti.com: added a missing change on musb_gadget.c to avoid
a compile error on a later patch ]
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
-rw-r--r-- | drivers/usb/musb/musb_virthub.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index e9f80adc45a4..22ec3e379980 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c @@ -47,6 +47,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend) { + struct usb_otg *otg = musb->xceiv->otg; u8 power; void __iomem *mbase = musb->mregs; @@ -81,7 +82,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend) case OTG_STATE_A_HOST: musb->xceiv->state = OTG_STATE_A_SUSPEND; musb->is_active = is_otg_enabled(musb) - && musb->xceiv->host->b_hnp_enable; + && otg->host->b_hnp_enable; if (musb->is_active) mod_timer(&musb->otg_timer, jiffies + msecs_to_jiffies( @@ -91,7 +92,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend) case OTG_STATE_B_HOST: musb->xceiv->state = OTG_STATE_B_WAIT_ACON; musb->is_active = is_otg_enabled(musb) - && musb->xceiv->host->b_hnp_enable; + && otg->host->b_hnp_enable; musb_platform_try_idle(musb, 0); break; default: @@ -179,6 +180,8 @@ static void musb_port_reset(struct musb *musb, bool do_reset) void musb_root_disconnect(struct musb *musb) { + struct usb_otg *otg = musb->xceiv->otg; + musb->port1_status = USB_PORT_STAT_POWER | (USB_PORT_STAT_C_CONNECTION << 16); @@ -188,7 +191,7 @@ void musb_root_disconnect(struct musb *musb) switch (musb->xceiv->state) { case OTG_STATE_A_SUSPEND: if (is_otg_enabled(musb) - && musb->xceiv->host->b_hnp_enable) { + && otg->host->b_hnp_enable) { musb->xceiv->state = OTG_STATE_A_PERIPHERAL; musb->g.is_a_peripheral = 1; break; |