Skip to contentSkip to conversation

drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros

PATCH In review Karim Eshapa 2 participants 2 messages Apr 30, 2017 – May 2, 2017

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

PATCH 1/1 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.

---
 drivers/video/fbdev/omap/lcd_mipid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/omap/lcd_mipid.c +1 -1
index c81f150..df9e6eb 100644
@@ -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);
 	}
Signature · 1 line
2.7.4