V4L/DVB (9408): tda8261: check status to avoid lock loss
authorManu Abraham <abraham.manu@gmail.com>
Fri, 28 Sep 2007 22:06:06 +0000 (19:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 29 Dec 2008 19:53:17 +0000 (17:53 -0200)
We need to check for tuner LOCK LOSS, especially in the case of simple PLL's

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/tda8261.c

index a6cd2b362b6e2be4010bd5daa96dfb538a07d29e..9cbd511d749e914338b1d20cfa6786fe163a2296 100644 (file)
@@ -73,6 +73,8 @@ static int tda8261_get_status(struct dvb_frontend *fe, u32 *status)
        u8 result = 0;
        int err = 0;
 
+       *status = 0;
+
        if ((err = tda8261_read(state, &result)) < 0) {
                printk("%s: I/O Error\n", __func__);
                return err;
@@ -184,6 +186,7 @@ static struct dvb_tuner_ops tda8261_ops = {
 
        .set_state      = tda8261_set_state,
        .get_state      = tda8261_get_state,
+       .get_status     = tda8261_get_status,
        .release        = tda8261_release
 };