Commit 4d3db7d7 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Felipe Balbi

usb: isp1760: use msecs_to_jiffies for time conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent bb90600d
...@@ -1274,7 +1274,7 @@ static void errata2_function(unsigned long data) ...@@ -1274,7 +1274,7 @@ static void errata2_function(unsigned long data)
for (slot = 0; slot < 32; slot++) for (slot = 0; slot < 32; slot++)
if (priv->atl_slots[slot].qh && time_after(jiffies, if (priv->atl_slots[slot].qh && time_after(jiffies,
priv->atl_slots[slot].timestamp + priv->atl_slots[slot].timestamp +
SLOT_TIMEOUT * HZ / 1000)) { msecs_to_jiffies(SLOT_TIMEOUT))) {
ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd);
if (!FROM_DW0_VALID(ptd.dw0) && if (!FROM_DW0_VALID(ptd.dw0) &&
!FROM_DW3_ACTIVE(ptd.dw3)) !FROM_DW3_ACTIVE(ptd.dw3))
...@@ -1286,7 +1286,7 @@ static void errata2_function(unsigned long data) ...@@ -1286,7 +1286,7 @@ static void errata2_function(unsigned long data)
spin_unlock_irqrestore(&priv->lock, spinflags); spin_unlock_irqrestore(&priv->lock, spinflags);
errata2_timer.expires = jiffies + SLOT_CHECK_PERIOD * HZ / 1000; errata2_timer.expires = jiffies + msecs_to_jiffies(SLOT_CHECK_PERIOD);
add_timer(&errata2_timer); add_timer(&errata2_timer);
} }
...@@ -1336,7 +1336,7 @@ static int isp1760_run(struct usb_hcd *hcd) ...@@ -1336,7 +1336,7 @@ static int isp1760_run(struct usb_hcd *hcd)
return retval; return retval;
setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd); setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd);
errata2_timer.expires = jiffies + SLOT_CHECK_PERIOD * HZ / 1000; errata2_timer.expires = jiffies + msecs_to_jiffies(SLOT_CHECK_PERIOD);
add_timer(&errata2_timer); add_timer(&errata2_timer);
chipid = reg_read32(hcd->regs, HC_CHIP_ID_REG); chipid = reg_read32(hcd->regs, HC_CHIP_ID_REG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment