Message ID | 1493570563-7188-1-git-send-email-karim.eshapa@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sunday, April 30, 2017 06:42:43 PM Karim Eshapa wrote: > Use time_before_eq time comparison defind kernel macro > that has safety check. > > Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com> Patch queued for 4.12, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index c81f150..df9e6eb 100644 --- a/drivers/video/fbdev/omap/lcd_mipid.c +++ b/drivers/video/fbdev/omap/lcd_mipid.c @@ -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); }
Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com> --- drivers/video/fbdev/omap/lcd_mipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)