summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/stb0899_drv.c
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2013-06-02 14:59:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-08 20:14:17 -0300
commit0c1d2b14d09b862ccd6300d774eb579161635710 (patch)
treeca80497dfd440f79d65a9a5c45e5d744f82ee581 /drivers/media/dvb-frontends/stb0899_drv.c
parent55b3318b3a49488a14ccfceffde668d548c4e427 (diff)
[media] stb0899: store successful inversion for next run
Usually, inversion doesn't change in a system. Storing the last successful inversion value speeds up tuning of DVB-S2 transponders. Signed-off-by: Reinhard Nißl <rnissl@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stb0899_drv.c')
-rw-r--r--drivers/media/dvb-frontends/stb0899_drv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/stb0899_drv.c b/drivers/media/dvb-frontends/stb0899_drv.c
index b3ccd3dbbda1..82391feb6839 100644
--- a/drivers/media/dvb-frontends/stb0899_drv.c
+++ b/drivers/media/dvb-frontends/stb0899_drv.c
@@ -1618,19 +1618,18 @@ static struct dvb_frontend_ops stb0899_ops = {
struct dvb_frontend *stb0899_attach(struct stb0899_config *config, struct i2c_adapter *i2c)
{
struct stb0899_state *state = NULL;
- enum stb0899_inversion inversion;
state = kzalloc(sizeof (struct stb0899_state), GFP_KERNEL);
if (state == NULL)
goto error;
- inversion = config->inversion;
state->verbose = &verbose;
state->config = config;
state->i2c = i2c;
state->frontend.ops = stb0899_ops;
state->frontend.demodulator_priv = state;
- state->internal.inversion = inversion;
+ /* use configured inversion as default -- we'll later autodetect inversion */
+ state->internal.inversion = config->inversion;
stb0899_wakeup(&state->frontend);
if (stb0899_get_dev_id(state) == -ENODEV) {