Skip to content

Commit

Permalink
V4L/DVB (6437): tuner: clear analog_demod_ops on release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 1dde7a4 commit e2be32a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit e2be32a

Please sign in to comment.