summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_virthub.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-02-14 19:49:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 20:08:15 (GMT)
commitf2dece4499eea534c7c92e49fbf6a9bb0510cbcf (patch)
tree55b6d0dbeeed98003369c4163bb3a5897b9ea217 /drivers/usb/musb/musb_virthub.c
parent73926db33b277c4c371edbc9fe9093adc9b2803b (diff)
downloadlinux-f2dece4499eea534c7c92e49fbf6a9bb0510cbcf.tar.xz
usb: musb: correct use of schedule_delayed_work()
schedule_delayed_work() takes the delay in jiffies, not msecs. Fix the caller sites in musb. This bug caused regressions with the cleanups that went in for 3.14 (8ed1fb790ea: "usb: musb: finish suspend/reset work independently from musb_hub_control()"). Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
-rw-r--r--drivers/usb/musb/musb_virthub.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 32f49e1..e2d2d8c 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -135,7 +135,8 @@ void musb_port_suspend(struct musb *musb, bool do_suspend)
/* later, GetPortStatus will stop RESUME signaling */
musb->port1_status |= MUSB_PORT_STAT_RESUME;
- schedule_delayed_work(&musb->finish_resume_work, 20);
+ schedule_delayed_work(&musb->finish_resume_work,
+ msecs_to_jiffies(20));
}
}
@@ -171,8 +172,7 @@ void musb_port_reset(struct musb *musb, bool do_reset)
if (musb->rh_timer > 0 && remain > 0) {
/* take into account the minimum delay after resume */
schedule_delayed_work(
- &musb->deassert_reset_work,
- jiffies_to_msecs(remain));
+ &musb->deassert_reset_work, remain);
return;
}
@@ -180,7 +180,8 @@ void musb_port_reset(struct musb *musb, bool do_reset)
power & ~MUSB_POWER_RESUME);
/* Give the core 1 ms to clear MUSB_POWER_RESUME */
- schedule_delayed_work(&musb->deassert_reset_work, 1);
+ schedule_delayed_work(&musb->deassert_reset_work,
+ msecs_to_jiffies(1));
return;
}
@@ -190,7 +191,8 @@ void musb_port_reset(struct musb *musb, bool do_reset)
musb->port1_status |= USB_PORT_STAT_RESET;
musb->port1_status &= ~USB_PORT_STAT_ENABLE;
- schedule_delayed_work(&musb->deassert_reset_work, 50);
+ schedule_delayed_work(&musb->deassert_reset_work,
+ msecs_to_jiffies(50));
} else {
dev_dbg(musb->controller, "root port reset stopped\n");
musb_writeb(mbase, MUSB_POWER,