Skip to content

Commit

Permalink
video: fbdev: use msecs_to_jiffies for time conversions
Browse files Browse the repository at this point in the history
This is only an API consolidation and should make things more readable by
replacing  var * HZ / 1000  by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Nicholas Mc Guire authored and Tomi Valkeinen committed Mar 10, 2015
1 parent dc4d521 commit 17713ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/fbdev/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ static int pxafb_smart_thread(void *arg)
mutex_unlock(&fbi->ctrlr_lock);

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(30 * HZ / 1000);
schedule_timeout(msecs_to_jiffies(30));
}

pr_debug("%s(): task ending\n", __func__);
Expand Down Expand Up @@ -1460,7 +1460,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
#ifdef CONFIG_FB_PXA_SMARTPANEL
if (fbi->lccr0 & LCCR0_LCDT) {
wait_for_completion_timeout(&fbi->refresh_done,
200 * HZ / 1000);
msecs_to_jiffies(200));
return;
}
#endif
Expand All @@ -1472,7 +1472,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
lcd_writel(fbi, LCCR0, lccr0);
lcd_writel(fbi, LCCR0, lccr0 | LCCR0_DIS);

wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);
wait_for_completion_timeout(&fbi->disable_done, msecs_to_jiffies(200));

/* disable LCD controller clock */
clk_disable_unprepare(fbi->clk);
Expand Down

0 comments on commit 17713ce

Please sign in to comment.