From: Manu Abraham Date: Sat, 22 Sep 2007 16:36:34 +0000 (-0300) Subject: V4L/DVB (9394): cache last successful state X-Git-Tag: v2.6.29-rc1~556^2~549 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0b8f15dcebb58ef8956203803c6de8f41a173dbc;p=karo-tx-linux.git V4L/DVB (9394): cache last successful state Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/tda8261.c b/drivers/media/dvb/frontends/tda8261.c index dc7dc025ceb7..616d88b07158 100644 --- a/drivers/media/dvb/frontends/tda8261.c +++ b/drivers/media/dvb/frontends/tda8261.c @@ -143,10 +143,12 @@ static int tda8261_set_state(struct dvb_frontend *fe, printk("%s: I/O Error\n", __func__); return err; } - if (status == 1) + if (status == 1) { printk("%s: Tuner Phase locked: status=%d\n", __func__, status); - else + state->frequency = frequency; /* cache last successful */ + } else { printk("%s: No Phase lock: status=%d\n", __func__, status); + } } else { printk("%s: Unknown parameter (param=%d)\n", __func__, param); return -EINVAL;