]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7278): bttv: Re-enable radio tuner support for VIDIOCGFREQ/VIDIOCSFREQ ioctls
authorRobert Fitzsimons <robfitz@273k.net>
Tue, 1 Apr 2008 14:41:54 +0000 (11:41 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 1 Apr 2008 22:35:44 +0000 (19:35 -0300)
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/bt8xx/bttv-driver.c

index fc3f57adb729ca63033d85fae32358851e921f8d..ee826fd1b2cab9a5ebc08ddd92e1452dda490643 100644 (file)
@@ -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;