LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] video: fbdev: use msecs_to_jiffies for time conversions
@ 2015-02-20 14:34 Nicholas Mc Guire
2015-03-10 12:32 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Mc Guire @ 2015-02-20 14:34 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard
Cc: Tomi Valkeinen, Jingoo Han, Daniel Vetter, Fabian Frederick,
Laurent Pinchart, Nicholas Mc Guire, Wolfram Sang, linux-fbdev,
linux-kernel
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>
---
v2: fixed missing closing parenthesis in pxafb_disable_controller.
Compile testing was missing part of the patched code due to
the missing CONFIG_FB_PXA_SMARTPANEL=y, so the missing closing
parenthesis reported by Tomi Valkeinen <tomi.valkeinen@ti.com>
pxafb_disable_controller went unnoticed.
Patch was only compile tested with viper_defconfig CONFIG_FB_PXA=m,
CONFIG_FB_PXA_SMARTPANEL=y
Patch is against 3.19.0 (localversion-next is -next-20150220)
drivers/video/fbdev/pxafb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index da2431e..d8b4743 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -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__);
@@ -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
@@ -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);
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] video: fbdev: use msecs_to_jiffies for time conversions
2015-02-20 14:34 [PATCH v2] video: fbdev: use msecs_to_jiffies for time conversions Nicholas Mc Guire
@ 2015-03-10 12:32 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2015-03-10 12:32 UTC (permalink / raw)
To: Nicholas Mc Guire, Jean-Christophe Plagniol-Villard
Cc: Jingoo Han, Daniel Vetter, Fabian Frederick, Laurent Pinchart,
Wolfram Sang, linux-fbdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
On 20/02/15 16:34, Nicholas Mc Guire wrote:
> 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>
> ---
>
> v2: fixed missing closing parenthesis in pxafb_disable_controller.
> Compile testing was missing part of the patched code due to
> the missing CONFIG_FB_PXA_SMARTPANEL=y, so the missing closing
> parenthesis reported by Tomi Valkeinen <tomi.valkeinen@ti.com>
> pxafb_disable_controller went unnoticed.
>
> Patch was only compile tested with viper_defconfig CONFIG_FB_PXA=m,
> CONFIG_FB_PXA_SMARTPANEL=y
>
> Patch is against 3.19.0 (localversion-next is -next-20150220)
>
> drivers/video/fbdev/pxafb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Thanks, queued for 4.1.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-10 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 14:34 [PATCH v2] video: fbdev: use msecs_to_jiffies for time conversions Nicholas Mc Guire
2015-03-10 12:32 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).