summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-06-08 14:00:37 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-06-08 14:00:37 +0000
commitef90104ff594fcbabdddd4659533a76a3f21d990 (patch)
treeb54c3ddd7f54aed282cbd770d66a81d152480ab2
parentf1ea5adca33dc0f1c8f714d9552a0cff7f985e20 (diff)
downloadmediapointer-dvb-s2-ef90104ff594fcbabdddd4659533a76a3f21d990.tar.gz
mediapointer-dvb-s2-ef90104ff594fcbabdddd4659533a76a3f21d990.tar.bz2
tuner-core.c:
- Small bug fix. Add check code before using is_stereo.
-rw-r--r--linux/drivers/media/video/tuner-core.c24
-rw-r--r--v4l/ChangeLog5
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: