aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv0299.c
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2005-11-09 00:35:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:01 -0500
commit3765022171874d249535a1c8b8190f408fd85f21 (patch)
tree6893e9ea13baada35915c0fbee3f8867600ca571 /drivers/media/dvb/frontends/stv0299.c
parent9691bb14d9ab646868a6392e9419070c304a9590 (diff)
[PATCH] dvb: stv0299: revert improper method
Remove my badly thought out patch. This does need done, but in a proper way. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r--drivers/media/dvb/frontends/stv0299.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 889d9257215d..b1876618a37d 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -64,8 +64,12 @@ struct stv0299_state {
64 u32 tuner_frequency; 64 u32 tuner_frequency;
65 u32 symbol_rate; 65 u32 symbol_rate;
66 fe_code_rate_t fec_inner; 66 fe_code_rate_t fec_inner;
67 int errmode;
67}; 68};
68 69
70#define STATUS_BER 0
71#define STATUS_UCBLOCKS 1
72
69static int debug; 73static int debug;
70static int debug_legacy_dish_switch; 74static int debug_legacy_dish_switch;
71#define dprintk(args...) \ 75#define dprintk(args...) \
@@ -517,8 +521,7 @@ static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber)
517{ 521{
518 struct stv0299_state* state = fe->demodulator_priv; 522 struct stv0299_state* state = fe->demodulator_priv;
519 523
520 stv0299_writeregI(state, 0x34, (stv0299_readreg(state, 0x34) & 0xcf) | 0x10); 524 if (state->errmode != STATUS_BER) return 0;
521 msleep(100);
522 *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); 525 *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);
523 526
524 return 0; 527 return 0;
@@ -557,9 +560,8 @@ static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
557{ 560{
558 struct stv0299_state* state = fe->demodulator_priv; 561 struct stv0299_state* state = fe->demodulator_priv;
559 562
560 stv0299_writeregI(state, 0x34, (stv0299_readreg(state, 0x34) & 0xcf) | 0x30); 563 if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0;
561 msleep(100); 564 else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);
562 *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);
563 565
564 return 0; 566 return 0;
565} 567}
@@ -708,6 +710,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
708 state->tuner_frequency = 0; 710 state->tuner_frequency = 0;
709 state->symbol_rate = 0; 711 state->symbol_rate = 0;
710 state->fec_inner = 0; 712 state->fec_inner = 0;
713 state->errmode = STATUS_BER;
711 714
712 /* check if the demod is there */ 715 /* check if the demod is there */
713 stv0299_writeregI(state, 0x02, 0x34); /* standby off */ 716 stv0299_writeregI(state, 0x02, 0x34); /* standby off */