|
@@ -262,6 +262,8 @@ static int vidioc_s_frequency(struct file *file, void *priv,
|
|
|
{
|
|
|
struct maxiradio *dev = video_drvdata(file);
|
|
|
|
|
|
+ if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO)
|
|
|
+ return -EINVAL;
|
|
|
if (f->frequency < FREQ_LO || f->frequency > FREQ_HI) {
|
|
|
dprintk(dev, 1, "radio freq (%d.%02d MHz) out of range (%d-%d)\n",
|
|
|
f->frequency / 16000,
|
|
@@ -285,6 +287,8 @@ static int vidioc_g_frequency(struct file *file, void *priv,
|
|
|
{
|
|
|
struct maxiradio *dev = video_drvdata(file);
|
|
|
|
|
|
+ if (f->tuner != 0)
|
|
|
+ return -EINVAL;
|
|
|
f->type = V4L2_TUNER_RADIO;
|
|
|
f->frequency = dev->freq;
|
|
|
|