V4L/DVB (6437): tuner: clear analog_demod_ops on release
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 21 Oct 2007 17:35:21 +0000 (14:35 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:01:08 +0000 (19:01 -0200)
Clear analog_demod_ops on release.
Fix test for analog_demod_ops after tuner attach.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-core.c

index f31de98bbfa54187f20d7252763bfd52885956a1..9de66769b62301b3b4dd006d85281238b55bd9fc 100644 (file)
@@ -101,6 +101,8 @@ static void fe_release(struct tuner *t)
 
        if (fe_tuner_ops->release)
                fe_tuner_ops->release(&t->fe);
+
+       t->fe.ops.analog_demod_ops = NULL;
 }
 
 static void fe_standby(struct tuner *t)
@@ -353,6 +355,8 @@ static void set_type(struct i2c_client *c, unsigned int type,
                break;
        }
 
+       ops = t->fe.ops.analog_demod_ops;
+
        if (((NULL == ops) ||
             ((NULL == ops->set_tv_freq) && (NULL == ops->set_radio_freq))) &&
            (fe_tuner_ops->set_analog_params)) {