From patchwork Fri Feb 6 09:14:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 5789031 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D05279F30C for ; Fri, 6 Feb 2015 09:18:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF42E201CE for ; Fri, 6 Feb 2015 09:18:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2EE1201CD for ; Fri, 6 Feb 2015 09:18:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbbBFJSY (ORCPT ); Fri, 6 Feb 2015 04:18:24 -0500 Received: from www.osadl.org ([62.245.132.105]:57041 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751925AbbBFJSW (ORCPT ); Fri, 6 Feb 2015 04:18:22 -0500 Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t169HxW3017881; Fri, 6 Feb 2015 10:17:59 +0100 From: Nicholas Mc Guire To: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen , Jingoo Han , Daniel Vetter , Fabian Frederick , Laurent Pinchart , Nicholas Mc Guire , Wolfram Sang , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: use msecs_to_jiffies for time conversion Date: Fri, 6 Feb 2015 04:14:01 -0500 Message-Id: <1423214041-15818-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with viper_defconfig (implies CONFIG_FB_PXA=m) Patch is against 3.19.0-rc7 (localversion-next is -next-20150204) 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);