Commit 22a09b43 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

[media] drxk: fix a '&' vs '|' bug

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
CC: Ralph Metzler <rjkm@metzlerbros.de>
Tested-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ab9cbcd3
......@@ -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 |=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment