From patchwork Mon May 15 19:14:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karim Eshapa X-Patchwork-Id: 9727793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CD116028A for ; Mon, 15 May 2017 19:15:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EC34289B0 for ; Mon, 15 May 2017 19:15:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 802F2289C3; Mon, 15 May 2017 19:15:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24107289B0 for ; Mon, 15 May 2017 19:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966415AbdEOTOn (ORCPT ); Mon, 15 May 2017 15:14:43 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36652 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966375AbdEOTOk (ORCPT ); Mon, 15 May 2017 15:14:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id u65so30524492wmu.3; Mon, 15 May 2017 12:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LV9x93NaS+Qcru7v52EfpqK0ZvoUgNCChJhdIFHoQ1o=; b=grc98ROVsRedf61mZTyCzXxa116hZONsjNLWMbrzQ95SeX/99NqCczz93D1AjWFZkB pvTFWlVryEYl01vAma1g25QRqRrmsDuwNRUxAUONd+nyurqNz+uS7hW1VtfoAskgp6vK Nuo7NVfhWFM+js4iPeow4KAWJbUdkSlyxB9FW8VZ0ORF51Bm/pX52Z/xysLn8ZPtuO8X wMPq4dzb7rwWtXZMduSDbYusMGBa2kgfwOz/Ngh+X4uO5cQaCx0vqR/qhUZyTaSJS2pE Pqsxz+K0YPjHTfgpqzxKtsHdvcSx5l00IXtpYzeD6D7uZdKiZODNCFuRcQuOh8AwGn1O l1LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LV9x93NaS+Qcru7v52EfpqK0ZvoUgNCChJhdIFHoQ1o=; b=TRzIq67Mcw0AR0LlvfzaofIq/PMzuG69ye64hN6gEPXKV+Y35EOPq2e7ZsnyZyVHHK xc27/aalBgcSc501dQt7nVy3822pV65HS9DlRDbN4iPj0qOunDHAVT/eQEoC1G46KEbM /1lxGvD0Ys4hl2z+K2dLH2wK2Z/Xs4fwVt+bsCh1HVNnORBLqc7lZqxQdtC0ltwclyZS jIqblsGUPmTbM67DmB/2HaJam8d9YMdhtDjN4aCs3Hmop0jrAkAZqL4iBFDMjZdluKnP UhGeJMCFMxozNeFWWQfnixHjyx2w+j5k3Gcd9sghdyjqLy2dbYsvEJXwqSffo+ZuZ7cH W6Tg== X-Gm-Message-State: AODbwcAA1FdS/PXBQB/pzA6NtSrh5E87OVeROBmA0PcG+Q1N/nOwcxfI zHXZIUdWz1SzBw== X-Received: by 10.28.8.145 with SMTP id 139mr4346777wmi.26.1494875678723; Mon, 15 May 2017 12:14:38 -0700 (PDT) Received: from localhost.localdomain ([156.196.197.4]) by smtp.gmail.com with ESMTPSA id n184sm5935280wmd.32.2017.05.15.12.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 May 2017 12:14:37 -0700 (PDT) From: Karim Eshapa To: tomi.valkeinen@ti.com Cc: b.zolnierkie@samsung.com, peter.ujfalusi@ti.com, tj@kernel.org, mingo@kernel.org, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro. Date: Mon, 15 May 2017 21:14:26 +0200 Message-Id: <1494875666-4109-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use time_before_eq() kernel macro for time comparison more safe. Signed-off-by: Karim Eshapa --- drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index fd2b372d..7f20bc2 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c @@ -100,7 +100,7 @@ static void hw_guard_wait(struct panel_drv_data *ddata) { unsigned long wait = ddata->hw_guard_end - jiffies; - if ((long)wait > 0 && wait <= ddata->hw_guard_wait) { + if ((long)wait > 0 && time_before_eq(wait, ddata->hw_guard_wait)) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(wait); }