diff options
Diffstat (limited to 'drivers/media/radio/radio-keene.c')
-rw-r--r-- | drivers/media/radio/radio-keene.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c index 296941a9ae25..4c9ae767fb31 100644 --- a/drivers/media/radio/radio-keene.c +++ b/drivers/media/radio/radio-keene.c | |||
@@ -215,15 +215,15 @@ static int vidioc_s_modulator(struct file *file, void *priv, | |||
215 | } | 215 | } |
216 | 216 | ||
217 | static int vidioc_s_frequency(struct file *file, void *priv, | 217 | static int vidioc_s_frequency(struct file *file, void *priv, |
218 | struct v4l2_frequency *f) | 218 | const struct v4l2_frequency *f) |
219 | { | 219 | { |
220 | struct keene_device *radio = video_drvdata(file); | 220 | struct keene_device *radio = video_drvdata(file); |
221 | unsigned freq = f->frequency; | ||
221 | 222 | ||
222 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) | 223 | if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO) |
223 | return -EINVAL; | 224 | return -EINVAL; |
224 | f->frequency = clamp(f->frequency, | 225 | freq = clamp(freq, FREQ_MIN * FREQ_MUL, FREQ_MAX * FREQ_MUL); |
225 | FREQ_MIN * FREQ_MUL, FREQ_MAX * FREQ_MUL); | 226 | return keene_cmd_main(radio, freq, true); |
226 | return keene_cmd_main(radio, f->frequency, true); | ||
227 | } | 227 | } |
228 | 228 | ||
229 | static int vidioc_g_frequency(struct file *file, void *priv, | 229 | static int vidioc_g_frequency(struct file *file, void *priv, |