linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.
@ 2017-05-15 19:14 ` Karim Eshapa
  2017-06-14 13:48   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Karim Eshapa @ 2017-05-15 19:14 UTC (permalink / raw)
  To: tomi.valkeinen
  Cc: b.zolnierkie, peter.ujfalusi, tj, mingo, linux-omap, linux-fbdev,
	linux-kernel, Karim Eshapa

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

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
index fd2b372d..7f20bc2 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
@@ -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);
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.
  2017-05-15 19:14 ` [PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro Karim Eshapa
@ 2017-06-14 13:48   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-06-14 13:48 UTC (permalink / raw)
  To: Karim Eshapa
  Cc: tomi.valkeinen, peter.ujfalusi, tj, mingo, linux-omap,
	linux-fbdev, linux-kernel

On Monday, May 15, 2017 09:14:26 PM Karim Eshapa wrote:
> Use time_before_eq() kernel macro for
> time comparison more safe.
> 
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>

Patch queued for 4.13, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-14 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20170515191442epcas5p32579d3f083abfeb3a329a25de53e6acc@epcas5p3.samsung.com>
2017-05-15 19:14 ` [PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro Karim Eshapa
2017-06-14 13:48   ` Bartlomiej Zolnierkiewicz

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).