mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roel Kluin <12o3l@tiscali.nl>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: pe1rxq@amsat.org, linux-usb@vger.kernel.org,
	video4linux-list@redhat.com, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] logical-bitwise & confusion in se401_init() (was: logical-bitwise & confusion in se401_init()?)
Date: Thu, 13 Mar 2008 16:51:29 +0100	[thread overview]
Message-ID: <47D94D81.5090108@tiscali.nl> (raw)
In-Reply-To: <20080313120602.6920a621@gaivota>

Mauro Carvalho Chehab wrote:
> On Mon, 10 Mar 2008 00:27:19 +0100
> Roel Kluin <12o3l@tiscali.nl> wrote:
> 
>> drivers/media/video/se401.c:1282:
>>
>> if (!cp[2] && SE401_FORMAT_BAYER) {
>>
>> shouldn't this be 'if (!(cp[2] & SE401_FORMAT_BAYER)) {'
>> drivers/media/video/se401.h:52:
>>
>> #define SE401_FORMAT_BAYER       0x40
> 
> I don't have this driver, but this seems to be the proper fix.
---
logical-bitwise & confusion, SE401_FORMAT_BAYER is defined 0x40

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c
index d5d7d6c..952c9bd 100644
--- a/drivers/media/video/se401.c
+++ b/drivers/media/video/se401.c
@@ -1279,7 +1279,7 @@ static int se401_init(struct usb_se401 *se401, int button)
 	rc=se401_sndctrl(0, se401, SE401_REQ_GET_HEIGHT, 0, cp, sizeof(cp));
 	se401->cheight=cp[0]+cp[1]*256;
 
-	if (!cp[2] && SE401_FORMAT_BAYER) {
+	if (!cp[2] & SE401_FORMAT_BAYER) {
 		err("Bayer format not supported!");
 		return 1;
 	}

       reply	other threads:[~2008-03-13 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47D47257.9090204@tiscali.nl>
     [not found] ` <20080313120602.6920a621@gaivota>
2008-03-13 15:51   ` Roel Kluin [this message]
2008-03-13 21:30     ` Rik van Riel
2008-03-13 22:58       ` [PATCH] logical-bitwise & confusion in se401_init() Roel Kluin

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=47D94D81.5090108@tiscali.nl \
    --to=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=pe1rxq@amsat.org \
    --cc=video4linux-list@redhat.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

Powered by JetHome