[media] drxk: fix a '&' vs '|' bug
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 26 Jun 2012 07:40:38 +0000 (04:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jul 2012 17:54:32 +0000 (14:54 -0300)
IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and
IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0.  (clkNeg | 0x2) is never
equal to zero so the condition can never be true.

I consulted with Ralph Metzler and the '|' should be changed to a '&'.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Ralph Metzler <rjkm@metzlerbros.de>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/drxk_hard.c

index 8fa28bb470880a12a562f742f25d53dfd748038f..317530f891c0c7c2269acc6fdd7a39c9f5ca4fa6 100644 (file)
@@ -3004,7 +3004,7 @@ static int ADCSynchronization(struct drxk_state *state)
                status = read16(state, IQM_AF_CLKNEG__A, &clkNeg);
                if (status < 0)
                        goto error;
-               if ((clkNeg | IQM_AF_CLKNEG_CLKNEGDATA__M) ==
+               if ((clkNeg & IQM_AF_CLKNEG_CLKNEGDATA__M) ==
                        IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS) {
                        clkNeg &= (~(IQM_AF_CLKNEG_CLKNEGDATA__M));
                        clkNeg |=