Skip to contentSkip to conversation

video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.

PATCH In review Karim Eshapa 2 participants 2 messages May 15, 2017 – Jun 14, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.

Use time_before_eq() kernel macro for
time comparison more safe.

---
 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +1 -1
index fd2b372d..7f20bc2 100644
@@ -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);
 	}
Signature · 1 line
2.7.4