summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2013-02-02 00:01:17 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-15 00:00:28 +0200
commit0a5ea88b31bed56350939c6a99c4cd58904baa66 (patch)
tree6a73f7ae7abf3a09438cedf599a3d24706796cfd /drivers/media/pci/saa7134/saa7134-video.c
parent[media] saa7134: v4l2-compliance: use v4l2_fh to fix priority handling (diff)
downloadlinux-0a5ea88b31bed56350939c6a99c4cd58904baa66.tar.xz
linux-0a5ea88b31bed56350939c6a99c4cd58904baa66.zip
[media] saa7134: v4l2-compliance: return real frequency
Make saa7134 driver more V4L2 compliant: don't cache frequency in s_frequency/g_frequency but return real one instead Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/pci/saa7134/saa7134-video.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 941e2ebab41d..506a9f401db7 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2051,8 +2051,11 @@ static int saa7134_g_frequency(struct file *file, void *priv,
struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;
+ if (0 != f->tuner)
+ return -EINVAL;
+
f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
- f->frequency = dev->ctl_freq;
+ saa_call_all(dev, tuner, g_frequency, f);
return 0;
}
@@ -2070,7 +2073,6 @@ static int saa7134_s_frequency(struct file *file, void *priv,
if (1 == fh->radio && V4L2_TUNER_RADIO != f->type)
return -EINVAL;
mutex_lock(&dev->lock);
- dev->ctl_freq = f->frequency;
saa_call_all(dev, tuner, s_frequency, f);