Skip to content

Commit

Permalink
V4L/DVB (9524): af9013: fix bug in status reading
Browse files Browse the repository at this point in the history
- ! has a higher precedence than &

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
roel kluin authored and Mauro Carvalho Chehab committed Nov 11, 2008
1 parent 4e6b610 commit 891bd13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/dvb/frontends/af9013.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ static int af9013_read_status(struct dvb_frontend *fe, fe_status_t *status)
if (tmp)
*status |= FE_HAS_SYNC | FE_HAS_LOCK;

if (!*status & FE_HAS_SIGNAL) {
if (!(*status & FE_HAS_SIGNAL)) {
/* AGC lock */
ret = af9013_read_reg_bits(state, 0xd1a0, 6, 1, &tmp);
if (ret)
Expand All @@ -1196,7 +1196,7 @@ static int af9013_read_status(struct dvb_frontend *fe, fe_status_t *status)
*status |= FE_HAS_SIGNAL;
}

if (!*status & FE_HAS_CARRIER) {
if (!(*status & FE_HAS_CARRIER)) {
/* CFO lock */
ret = af9013_read_reg_bits(state, 0xd333, 7, 1, &tmp);
if (ret)
Expand All @@ -1205,7 +1205,7 @@ static int af9013_read_status(struct dvb_frontend *fe, fe_status_t *status)
*status |= FE_HAS_CARRIER;
}

if (!*status & FE_HAS_CARRIER) {
if (!(*status & FE_HAS_CARRIER)) {
/* SFOE lock */
ret = af9013_read_reg_bits(state, 0xd334, 6, 1, &tmp);
if (ret)
Expand Down

0 comments on commit 891bd13

Please sign in to comment.