aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv090x.c
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2010-01-23 03:49:08 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:46:47 -0400
commitc5b74b0f5e81386ca1e9b1128de83502e92fa028 (patch)
tree581f8bdba31fc29a576440bbd85373a435a04bfa /drivers/media/dvb/frontends/stv090x.c
parent19c4ee58325ac7c9d9595153fabb5d885dfe931e (diff)
V4L/DVB: [STV090x, STV6110x] Use tuner sleep within the demodulator control
Oliver Endriss <o.endriss@gmx.de> pointed out: Imho not a good idea, as the frontend thread calls - fe->ops.tuner_ops.init - fe->ops.tuner_ops.sleep If you remove fe->ops.i2c_gate_ctrl, init and sleep will fail, because gate_ctrl was never called... -- Signed-off-by: Manu Abraham <manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv090x.c')
-rw-r--r--drivers/media/dvb/frontends/stv090x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
index 0af17083511c..a80a34bb9eb8 100644
--- a/drivers/media/dvb/frontends/stv090x.c
+++ b/drivers/media/dvb/frontends/stv090x.c
@@ -3838,6 +3838,11 @@ static int stv090x_sleep(struct dvb_frontend *fe)
3838 struct stv090x_state *state = fe->demodulator_priv; 3838 struct stv090x_state *state = fe->demodulator_priv;
3839 u32 reg; 3839 u32 reg;
3840 3840
3841 if (state->config->tuner_init) {
3842 if (state->config->tuner_sleep(fe) < 0)
3843 goto err_gateoff;
3844 }
3845
3841 dprintk(FE_DEBUG, 1, "Set %s to sleep", 3846 dprintk(FE_DEBUG, 1, "Set %s to sleep",
3842 state->device == STV0900 ? "STV0900" : "STV0903"); 3847 state->device == STV0900 ? "STV0900" : "STV0903");
3843 3848
@@ -3852,6 +3857,9 @@ static int stv090x_sleep(struct dvb_frontend *fe)
3852 goto err; 3857 goto err;
3853 3858
3854 return 0; 3859 return 0;
3860
3861err_gateoff:
3862 stv090x_i2c_gate_ctrl(state, 0);
3855err: 3863err:
3856 dprintk(FE_ERROR, 1, "I/O error"); 3864 dprintk(FE_ERROR, 1, "I/O error");
3857 return -1; 3865 return -1;