lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] logical-bitwise & confusion in se401_init() (was: logical-bitwise & confusion in se401_init()?)
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;
}


\
 
 \ /
  Last update: 2008-03-13 16:53    [W:0.031 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site