summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Fitzsimons <robfitz@273k.net>2008-04-01 11:41:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-01 19:35:44 -0300
commit1b0690134ec5dafb523a951a8756bb8735382fec (patch)
tree48180a18fdf279c858d6a6b690cf88706a185c96
parent5cd3955cb8adfc1edf481e9e1cb2289db50ccacb (diff)
downloadlinux-1b0690134ec5dafb523a951a8756bb8735382fec.tar.gz
linux-1b0690134ec5dafb523a951a8756bb8735382fec.tar.bz2
linux-1b0690134ec5dafb523a951a8756bb8735382fec.zip
V4L/DVB (7278): bttv: Re-enable radio tuner support for VIDIOCGFREQ/VIDIOCSFREQ ioctls
Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index fc3f57adb729..ee826fd1b2ca 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1990,7 +1990,7 @@ static int bttv_g_frequency(struct file *file, void *priv,
if (0 != err)
return err;
- f->type = V4L2_TUNER_ANALOG_TV;
+ f->type = btv->radio_user ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
f->frequency = btv->freq;
return 0;
@@ -2009,7 +2009,8 @@ static int bttv_s_frequency(struct file *file, void *priv,
if (unlikely(f->tuner != 0))
return -EINVAL;
- if (unlikely(f->type != V4L2_TUNER_ANALOG_TV))
+ if (unlikely(f->type != (btv->radio_user
+ ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV)))
return -EINVAL;
mutex_lock(&btv->lock);
btv->freq = f->frequency;