aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-video.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 9593fd3cdc85..f3104f008f46 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1356,11 +1356,8 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1356 if (f->tuner) 1356 if (f->tuner)
1357 return -EINVAL; 1357 return -EINVAL;
1358 1358
1359 f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
1360 f->frequency = dev->ctl_freq; 1359 f->frequency = dev->ctl_freq;
1361 1360
1362 call_all(dev, tuner, g_frequency, f);
1363
1364 return 0; 1361 return 0;
1365} 1362}
1366 1363
@@ -1383,16 +1380,12 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1383 if (0 != f->tuner) 1380 if (0 != f->tuner)
1384 return -EINVAL; 1381 return -EINVAL;
1385 1382
1386 if (unlikely(0 == fh->radio && f->type != V4L2_TUNER_ANALOG_TV))
1387 return -EINVAL;
1388 if (unlikely(1 == fh->radio && f->type != V4L2_TUNER_RADIO))
1389 return -EINVAL;
1390
1391 /* set pre channel change settings in DIF first */ 1383 /* set pre channel change settings in DIF first */
1392 rc = cx231xx_tuner_pre_channel_change(dev); 1384 rc = cx231xx_tuner_pre_channel_change(dev);
1393 1385
1394 dev->ctl_freq = f->frequency;
1395 call_all(dev, tuner, s_frequency, f); 1386 call_all(dev, tuner, s_frequency, f);
1387 call_all(dev, tuner, g_frequency, f);
1388 dev->ctl_freq = f->frequency;
1396 1389
1397 /* set post channel change settings in DIF first */ 1390 /* set post channel change settings in DIF first */
1398 rc = cx231xx_tuner_post_channel_change(dev); 1391 rc = cx231xx_tuner_post_channel_change(dev);