From: Karim Eshapa Date: Tue, 2 May 2017 11:47:54 +0000 (+0200) Subject: drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5c9cfda13dc503f4b25b486a57974e0414adb6f1;p=linux.git drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index c81f150589e1f..df9e6ebcfad5f 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); }