summaryrefslogtreecommitdiff
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-01-31 11:45:13 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 17:01:17 (GMT)
commitf74f89cb1cf2cccdc111bcab7de4fb8c41bb2a07 (patch)
tree7194c9988f414b6b45d720e2e99d4742ed8da885 /drivers/media/pci
parent1b9e94dc69959e963fe57ede46259f792641af4d (diff)
downloadlinux-f74f89cb1cf2cccdc111bcab7de4fb8c41bb2a07.tar.xz
[media] bttv: fix ENUM_INPUT and S_INPUT
- Fix ENUM_INPUT audioset. - Fix incorrect input check in s_input. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index b36d675..6e61dbd 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -1923,7 +1923,7 @@ static int bttv_enum_input(struct file *file, void *priv,
}
i->type = V4L2_INPUT_TYPE_CAMERA;
- i->audioset = 1;
+ i->audioset = 0;
if (btv->tuner_type != TUNER_ABSENT && i->index == 0) {
sprintf(i->name, "Television");
@@ -1964,21 +1964,16 @@ static int bttv_s_input(struct file *file, void *priv, unsigned int i)
{
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
-
int err;
err = v4l2_prio_check(&btv->prio, fh->prio);
- if (unlikely(err))
- goto err;
+ if (err)
+ return err;
- if (i > bttv_tvcards[btv->c.type].video_inputs) {
- err = -EINVAL;
- goto err;
- }
+ if (i >= bttv_tvcards[btv->c.type].video_inputs)
+ return -EINVAL;
set_input(btv, i, btv->tvnorm);
-
-err:
return 0;
}