Skip to content

Commit

Permalink
drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Karim Eshapa authored and Bartlomiej Zolnierkiewicz committed May 2, 2017
1 parent dc85e9a commit 5c9cfda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/omap/lcd_mipid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5c9cfda

Please sign in to comment.