drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros
authorKarim Eshapa <karim.eshapa@gmail.com>
Tue, 2 May 2017 11:47:54 +0000 (13:47 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 2 May 2017 11:47:54 +0000 (13:47 +0200)
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>
drivers/video/fbdev/omap/lcd_mipid.c

index c81f150589e1f8a2c4a9c342d305ef2684f121cb..df9e6ebcfad5f8d37048e3db8901406e96177c1a 100644 (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);
        }