video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.
authorKarim Eshapa <karim.eshapa@gmail.com>
Wed, 14 Jun 2017 15:40:56 +0000 (17:40 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 14 Jun 2017 15:40:56 +0000 (17:40 +0200)
Use time_before_eq() kernel macro for time comparison.

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
Cc: tomi.valkeinen@ti.com
Cc: peter.ujfalusi@ti.com
Cc: tj@kernel.org
Cc: mingo@kernel.org
[b.zolnierkie: patch description fixup]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c

index fd2b372d0264de94aea6f3789738d1809c19c8a7..7f20bc267234c92cf7c2a877f7998a29f64c5f3f 100644 (file)
@@ -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);
        }