summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-01 18:24:15 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-01 18:24:15 -0300
commit2006ab389f819c535db3a5215d7feeaf6bceed18 (patch)
tree6c3d6ece5b2b6ac0eab4a13e5d3b3967b28c1fc8 /linux/drivers/media/video/bt8xx/bttv-driver.c
parent6ae887b1a1e62f244b6c81421adab044b3056629 (diff)
parent621b289ccfba938787bd179d47be1326f88f13a2 (diff)
downloadmediapointer-dvb-s2-2006ab389f819c535db3a5215d7feeaf6bceed18.tar.gz
mediapointer-dvb-s2-2006ab389f819c535db3a5215d7feeaf6bceed18.tar.bz2
merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index 51b4a8b59..6e9ad7290 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -3158,12 +3158,18 @@ static int bttv_s_crop(struct file *file, void *f, struct v4l2_crop *crop)
static int bttv_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
{
+ if (unlikely(a->index))
+ return -EINVAL;
+
strcpy(a->name, "audio");
return 0;
}
static int bttv_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
{
+ if (unlikely(a->index))
+ return -EINVAL;
+
return 0;
}
@@ -3553,7 +3559,7 @@ static int radio_enum_input(struct file *file, void *priv,
return -EINVAL;
strcpy(i->name, "Radio");
- i->type = V4L2_INPUT_TYPE_TUNER;
+ i->type = V4L2_INPUT_TYPE_TUNER;
return 0;
}
@@ -3561,8 +3567,11 @@ static int radio_enum_input(struct file *file, void *priv,
static int radio_g_audio(struct file *file, void *priv,
struct v4l2_audio *a)
{
- memset(a, 0, sizeof(*a));
+ if (unlikely(a->index))
+ return -EINVAL;
+
strcpy(a->name, "Radio");
+
return 0;
}
@@ -3582,11 +3591,17 @@ static int radio_s_tuner(struct file *file, void *priv,
static int radio_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
{
+ if (unlikely(a->index))
+ return -EINVAL;
+
return 0;
}
static int radio_s_input(struct file *filp, void *priv, unsigned int i)
{
+ if (unlikely(i->index))
+ return -EINVAL;
+
return 0;
}