aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2012-05-14 15:43:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-20 11:14:05 -0400
commite58c11f234b58a7692bd41ecb775b4062ea45b83 (patch)
tree840afd5d8936481096b8a8545888498773512ac9 /drivers/media/dvb
parent38431a98a183b37b4512225d1a95336d82efbf9b (diff)
[media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/m88rs2000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/m88rs2000.c b/drivers/media/dvb/frontends/m88rs2000.c
index 0ad5bd8c1834..312588e84dae 100644
--- a/drivers/media/dvb/frontends/m88rs2000.c
+++ b/drivers/media/dvb/frontends/m88rs2000.c
@@ -787,13 +787,13 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe)
787 return -ENODEV; 787 return -ENODEV;
788 788
789 for (i = 0; i < 25; i++) { 789 for (i = 0; i < 25; i++) {
790 u8 reg = m88rs2000_demod_read(state, 0x8c); 790 reg = m88rs2000_demod_read(state, 0x8c);
791 if ((reg & 0x7) == 0x7) { 791 if ((reg & 0x7) == 0x7) {
792 status = FE_HAS_LOCK; 792 status = FE_HAS_LOCK;
793 break; 793 break;
794 } 794 }
795 state->no_lock_count++; 795 state->no_lock_count++;
796 if (state->no_lock_count > 15) { 796 if (state->no_lock_count == 15) {
797 reg = m88rs2000_demod_read(state, 0x70); 797 reg = m88rs2000_demod_read(state, 0x70);
798 reg ^= 0x4; 798 reg ^= 0x4;
799 m88rs2000_demod_write(state, 0x70, reg); 799 m88rs2000_demod_write(state, 0x70, reg);