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 <karim.eshapa@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
Karim Eshapa 2017-05-02 13:47:54 +02:00 committed by Bartlomiej Zolnierkiewicz
parent dc85e9a874
commit 5c9cfda13d
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}