summaryrefslogtreecommitdiff
path: root/drivers/media/radio/radio-isa.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-19 11:09:26 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-24 13:25:34 +0400
commitb530a447bb588fdf43fdf4eb909e4ee1921d47ac (patch)
tree8c9f6abb0f0c07ceea984a87fd80e9e65e7d483b /drivers/media/radio/radio-isa.c
parent69aa6f4ec669b9121057cc9e32cb10b5f744f6d6 (diff)
downloadlinux-b530a447bb588fdf43fdf4eb909e4ee1921d47ac.tar.xz
[media] v4l2: add const to argument of write-only s_frequency ioctl
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-isa.c')
-rw-r--r--drivers/media/radio/radio-isa.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/radio/radio-isa.c b/drivers/media/radio/radio-isa.c
index fe0a4f85c422..0c1e27b13e69 100644
--- a/drivers/media/radio/radio-isa.c
+++ b/drivers/media/radio/radio-isa.c
@@ -102,17 +102,18 @@ static int radio_isa_s_tuner(struct file *file, void *priv,
}
static int radio_isa_s_frequency(struct file *file, void *priv,
- struct v4l2_frequency *f)
+ const struct v4l2_frequency *f)
{
struct radio_isa_card *isa = video_drvdata(file);
+ u32 freq = f->frequency;
int res;
if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO)
return -EINVAL;
- f->frequency = clamp(f->frequency, FREQ_LOW, FREQ_HIGH);
- res = isa->drv->ops->s_frequency(isa, f->frequency);
+ freq = clamp(freq, FREQ_LOW, FREQ_HIGH);
+ res = isa->drv->ops->s_frequency(isa, freq);
if (res == 0)
- isa->freq = f->frequency;
+ isa->freq = freq;
return res;
}