diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-01-31 06:45:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 12:01:17 -0500 |
commit | f74f89cb1cf2cccdc111bcab7de4fb8c41bb2a07 (patch) | |
tree | 7194c9988f414b6b45d720e2e99d4742ed8da885 /drivers/media/pci/bt8xx/bttv-driver.c | |
parent | 1b9e94dc69959e963fe57ede46259f792641af4d (diff) |
[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/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 15 |
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 b36d67577535..6e61dbdd95c3 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, | |||
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | i->type = V4L2_INPUT_TYPE_CAMERA; | 1925 | i->type = V4L2_INPUT_TYPE_CAMERA; |
1926 | i->audioset = 1; | 1926 | i->audioset = 0; |
1927 | 1927 | ||
1928 | if (btv->tuner_type != TUNER_ABSENT && i->index == 0) { | 1928 | if (btv->tuner_type != TUNER_ABSENT && i->index == 0) { |
1929 | sprintf(i->name, "Television"); | 1929 | sprintf(i->name, "Television"); |
@@ -1964,21 +1964,16 @@ static int bttv_s_input(struct file *file, void *priv, unsigned int i) | |||
1964 | { | 1964 | { |
1965 | struct bttv_fh *fh = priv; | 1965 | struct bttv_fh *fh = priv; |
1966 | struct bttv *btv = fh->btv; | 1966 | struct bttv *btv = fh->btv; |
1967 | |||
1968 | int err; | 1967 | int err; |
1969 | 1968 | ||
1970 | err = v4l2_prio_check(&btv->prio, fh->prio); | 1969 | err = v4l2_prio_check(&btv->prio, fh->prio); |
1971 | if (unlikely(err)) | 1970 | if (err) |
1972 | goto err; | 1971 | return err; |
1973 | 1972 | ||
1974 | if (i > bttv_tvcards[btv->c.type].video_inputs) { | 1973 | if (i >= bttv_tvcards[btv->c.type].video_inputs) |
1975 | err = -EINVAL; | 1974 | return -EINVAL; |
1976 | goto err; | ||
1977 | } | ||
1978 | 1975 | ||
1979 | set_input(btv, i, btv->tvnorm); | 1976 | set_input(btv, i, btv->tvnorm); |
1980 | |||
1981 | err: | ||
1982 | return 0; | 1977 | return 0; |
1983 | } | 1978 | } |
1984 | 1979 | ||