From ef90104ff594fcbabdddd4659533a76a3f21d990 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 8 Jun 2005 14:00:37 +0000 Subject: tuner-core.c: - Small bug fix. Add check code before using is_stereo. --- linux/drivers/media/video/tuner-core.c | 24 ++++++++++++++---------- v4l/ChangeLog | 5 +++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index a33e64481..e92c65160 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.11 2005/06/08 01:28:09 mchehab Exp $ + * $Id: tuner-core.c,v 1.12 2005/06/08 14:00:37 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -416,10 +416,12 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) if (V4L2_TUNER_RADIO == t->mode) { if (t->has_signal) vt->signal = t->has_signal(client); - if (t->is_stereo(client)) - vt-> flags |= VIDEO_TUNER_STEREO_ON; - else - vt-> flags &= 0xffff ^ VIDEO_TUNER_STEREO_ON; + if (t->is_stereo) { + if (t->is_stereo(client)) + vt-> flags |= VIDEO_TUNER_STEREO_ON; + else + vt-> flags &= 0xffff ^ VIDEO_TUNER_STEREO_ON; + } } return 0; @@ -482,11 +484,13 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) if (V4L2_TUNER_RADIO == t->mode) { if (t->has_signal) tuner -> signal = t->has_signal(client); - if (t->is_stereo(client)) { - tuner -> capability |= V4L2_TUNER_CAP_STEREO; - tuner -> rxsubchans |= V4L2_TUNER_SUB_STEREO; - } else { - tuner -> rxsubchans &= 0xffff ^ V4L2_TUNER_SUB_STEREO; + if (t->is_stereo) { + if (t->is_stereo(client)) { + tuner -> capability |= V4L2_TUNER_CAP_STEREO; + tuner -> rxsubchans |= V4L2_TUNER_SUB_STEREO; + } else { + tuner -> rxsubchans &= 0xffff ^ V4L2_TUNER_SUB_STEREO; + } } } tuner->rangelow = tv_range[0] * 16; diff --git a/v4l/ChangeLog b/v4l/ChangeLog index f06010425..7e71b8f70 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,8 @@ +2005-06-08 14:00 mchehab + * tuner-core.c + + - Add check code before using is_stereo. + 2005-06-08 11:41 mchehab * .bp/2.6/i2c-tuner,.bp/2.6/v4l-driver-doc: -- cgit v1.2.3