From: Karim Eshapa <karim.eshapa@gmail.com>
To: tomi.valkeinen@ti.com
Cc: b.zolnierkie@samsung.com, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
Karim Eshapa <karim.eshapa@gmail.com>
Subject: [PATCH] drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros
Date: Sun, 30 Apr 2017 16:42:43 +0000 [thread overview]
Message-ID: <1493570563-7188-1-git-send-email-karim.eshapa@gmail.com> (raw)
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(-)
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);
}
--
2.7.4
next reply other threads:[~2017-04-30 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170430164251epcas1p263435da7131c78ae26d3bd76f26f1da1@epcas1p2.samsung.com>
2017-04-30 16:42 ` Karim Eshapa [this message]
2017-05-02 11:36 ` [PATCH] drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493570563-7188-1-git-send-email-karim.eshapa@gmail.com \
--to=karim.eshapa@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).