diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-19 04:09:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 06:25:34 -0300 |
commit | b530a447bb588fdf43fdf4eb909e4ee1921d47ac (patch) | |
tree | 8c9f6abb0f0c07ceea984a87fd80e9e65e7d483b /drivers/media/usb/cx231xx | |
parent | 69aa6f4ec669b9121057cc9e32cb10b5f744f6d6 (diff) | |
download | linux-b530a447bb588fdf43fdf4eb909e4ee1921d47ac.tar.gz linux-b530a447bb588fdf43fdf4eb909e4ee1921d47ac.tar.bz2 linux-b530a447bb588fdf43fdf4eb909e4ee1921d47ac.zip |
[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/usb/cx231xx')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-video.c | 7 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index ac6200870a62..96f65318d788 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -1172,10 +1172,11 @@ int cx231xx_g_frequency(struct file *file, void *priv, } int cx231xx_s_frequency(struct file *file, void *priv, - struct v4l2_frequency *f) + const struct v4l2_frequency *f) { struct cx231xx_fh *fh = priv; struct cx231xx *dev = fh->dev; + struct v4l2_frequency new_freq = *f; int rc; u32 if_frequency = 5400000; @@ -1194,8 +1195,8 @@ int cx231xx_s_frequency(struct file *file, void *priv, rc = cx231xx_tuner_pre_channel_change(dev); call_all(dev, tuner, s_frequency, f); - call_all(dev, tuner, g_frequency, f); - dev->ctl_freq = f->frequency; + call_all(dev, tuner, g_frequency, &new_freq); + dev->ctl_freq = new_freq.frequency; /* set post channel change settings in DIF first */ rc = cx231xx_tuner_post_channel_change(dev); diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index dff3f1d73f28..6f701e9bec44 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h @@ -940,7 +940,7 @@ int cx231xx_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t); int cx231xx_g_frequency(struct file *file, void *priv, struct v4l2_frequency *f); int cx231xx_s_frequency(struct file *file, void *priv, - struct v4l2_frequency *f); + const struct v4l2_frequency *f); int cx231xx_enum_input(struct file *file, void *priv, struct v4l2_input *i); int cx231xx_g_input(struct file *file, void *priv, unsigned int *i); |