public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -next 1/3] media/IR/imon: precendence issue: ! vs ==
@ 2010-05-04 11:37 Dan Carpenter
  2010-05-04 13:54 ` Jarod Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-04 11:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Jarod Wilson, linux-media

The original condition is always false because ! has higher precedence
than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index b65c31a..93b5796 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -975,7 +975,7 @@ static void imon_touch_display_timeout(unsigned long data)
 {
 	struct imon_context *ictx = (struct imon_context *)data;
 
-	if (!ictx->display_type == IMON_DISPLAY_TYPE_VGA)
+	if (ictx->display_type != IMON_DISPLAY_TYPE_VGA)
 		return;
 
 	input_report_abs(ictx->touch, ABS_X, ictx->touch_x);

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

* Re: [patch -next 1/3] media/IR/imon: precendence issue: ! vs ==
  2010-05-04 11:37 [patch -next 1/3] media/IR/imon: precendence issue: ! vs == Dan Carpenter
@ 2010-05-04 13:54 ` Jarod Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jarod Wilson @ 2010-05-04 13:54 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, Jarod Wilson, linux-media

On Tue, May 4, 2010 at 7:37 AM, Dan Carpenter <error27@gmail.com> wrote:
> The original condition is always false because ! has higher precedence
> than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@wilsonet.com

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

end of thread, other threads:[~2010-05-04 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 11:37 [patch -next 1/3] media/IR/imon: precendence issue: ! vs == Dan Carpenter
2010-05-04 13:54 ` Jarod Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox