aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index d585c19a5d9c..af79089a0169 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1221,8 +1221,9 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1221} 1221}
1222 1222
1223static int vidioc_s_frequency(struct file *file, void *priv, 1223static int vidioc_s_frequency(struct file *file, void *priv,
1224 struct v4l2_frequency *f) 1224 const struct v4l2_frequency *f)
1225{ 1225{
1226 struct v4l2_frequency new_freq = *f;
1226 struct em28xx_fh *fh = priv; 1227 struct em28xx_fh *fh = priv;
1227 struct em28xx *dev = fh->dev; 1228 struct em28xx *dev = fh->dev;
1228 1229
@@ -1230,8 +1231,8 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1230 return -EINVAL; 1231 return -EINVAL;
1231 1232
1232 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, f); 1233 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, f);
1233 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, g_frequency, f); 1234 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, g_frequency, &new_freq);
1234 dev->ctl_freq = f->frequency; 1235 dev->ctl_freq = new_freq.frequency;
1235 1236
1236 return 0; 1237 return 0;
1237} 1238}