aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/pci/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil2013-03-19 04:09:26 -0300
committerMauro Carvalho Chehab2013-03-24 06:25:34 -0300
commitb530a447bb588fdf43fdf4eb909e4ee1921d47ac (patch)
tree8c9f6abb0f0c07ceea984a87fd80e9e65e7d483b /drivers/media/pci/bt8xx/bttv-driver.c
parent69aa6f4ec669b9121057cc9e32cb10b5f744f6d6 (diff)
[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/pci/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 2fb2168f74e2..3156daf2c804 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -1852,24 +1852,26 @@ static int bttv_g_frequency(struct file *file, void *priv,
return 0;
}
-static void bttv_set_frequency(struct bttv *btv, struct v4l2_frequency *f)
+static void bttv_set_frequency(struct bttv *btv, const struct v4l2_frequency *f)
{
+ struct v4l2_frequency new_freq = *f;
+
bttv_call_all(btv, tuner, s_frequency, f);
/* s_frequency may clamp the frequency, so get the actual
frequency before assigning radio/tv_freq. */
- bttv_call_all(btv, tuner, g_frequency, f);
- if (f->type == V4L2_TUNER_RADIO) {
+ bttv_call_all(btv, tuner, g_frequency, &new_freq);
+ if (new_freq.type == V4L2_TUNER_RADIO) {
radio_enable(btv);
- btv->radio_freq = f->frequency;
+ btv->radio_freq = new_freq.frequency;
if (btv->has_matchbox)
tea5757_set_freq(btv, btv->radio_freq);
} else {
- btv->tv_freq = f->frequency;
+ btv->tv_freq = new_freq.frequency;
}
}
static int bttv_s_frequency(struct file *file, void *priv,
- struct v4l2_frequency *f)
+ const struct v4l2_frequency *f)
{
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;