Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1427397AbdD3Qm7 (ORCPT ); Sun, 30 Apr 2017 12:42:59 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33561 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425968AbdD3Qmt (ORCPT ); Sun, 30 Apr 2017 12:42:49 -0400 From: Karim Eshapa To: tomi.valkeinen@ti.com Cc: b.zolnierkie@samsung.com, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros Date: Sun, 30 Apr 2017 18:42:43 +0200 Message-Id: <1493570563-7188-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 23 Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa --- drivers/video/fbdev/omap/lcd_mipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index c81f150..df9e6eb 100644 --- a/drivers/video/fbdev/omap/lcd_mipid.c +++ b/drivers/video/fbdev/omap/lcd_mipid.c @@ -174,7 +174,7 @@ static void hw_guard_wait(struct mipid_device *md) { unsigned long wait = md->hw_guard_end - jiffies; - if ((long)wait > 0 && wait <= md->hw_guard_wait) { + if ((long)wait > 0 && time_before_eq(wait, md->hw_guard_wait)) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(wait); } -- 2.7.4