Skip to content

Commit

Permalink
[media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
Browse files Browse the repository at this point in the history
Continuous flip of bit2 reg 0x70 can cause device to become unresponsive.

Also correct reg read mistake.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Malcolm Priestley authored and Mauro Carvalho Chehab committed May 20, 2012
1 parent 38431a9 commit e58c11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/frontends/m88rs2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,13 +787,13 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe)
return -ENODEV;

for (i = 0; i < 25; i++) {
u8 reg = m88rs2000_demod_read(state, 0x8c);
reg = m88rs2000_demod_read(state, 0x8c);
if ((reg & 0x7) == 0x7) {
status = FE_HAS_LOCK;
break;
}
state->no_lock_count++;
if (state->no_lock_count > 15) {
if (state->no_lock_count == 15) {
reg = m88rs2000_demod_read(state, 0x70);
reg ^= 0x4;
m88rs2000_demod_write(state, 0x70, reg);
Expand Down

0 comments on commit e58c11f

Please sign in to comment.