diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-15 05:10:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 05:47:00 -0400 |
commit | 314527acbbb3f33f72c2ef19d8cfabcada9912a5 (patch) | |
tree | 871021b9e888444f9f71f5c12ecf0272d77fdf8d /drivers/media/pci | |
parent | 2f73c7c582a685b3198b974cd6d964d0338f8ab5 (diff) |
[media] v4l2: pass std by value to the write-only s_std ioctl
This ioctl is defined as IOW, so pass the argument by value instead of by
reference. I could have chosen to add const instead, but this is 1) easier
to handle in drivers and 2) consistent with the s_std subdev operation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
21 files changed, 66 insertions, 66 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 7aea24bf3a37..4b9a256f506e 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -1713,7 +1713,7 @@ static void radio_enable(struct bttv *btv) | |||
1713 | } | 1713 | } |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | static int bttv_s_std(struct file *file, void *priv, v4l2_std_id *id) | 1716 | static int bttv_s_std(struct file *file, void *priv, v4l2_std_id id) |
1717 | { | 1717 | { |
1718 | struct bttv_fh *fh = priv; | 1718 | struct bttv_fh *fh = priv; |
1719 | struct bttv *btv = fh->btv; | 1719 | struct bttv *btv = fh->btv; |
@@ -1721,14 +1721,14 @@ static int bttv_s_std(struct file *file, void *priv, v4l2_std_id *id) | |||
1721 | int err = 0; | 1721 | int err = 0; |
1722 | 1722 | ||
1723 | for (i = 0; i < BTTV_TVNORMS; i++) | 1723 | for (i = 0; i < BTTV_TVNORMS; i++) |
1724 | if (*id & bttv_tvnorms[i].v4l2_id) | 1724 | if (id & bttv_tvnorms[i].v4l2_id) |
1725 | break; | 1725 | break; |
1726 | if (i == BTTV_TVNORMS) { | 1726 | if (i == BTTV_TVNORMS) { |
1727 | err = -EINVAL; | 1727 | err = -EINVAL; |
1728 | goto err; | 1728 | goto err; |
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | btv->std = *id; | 1731 | btv->std = id; |
1732 | set_tvnorm(btv, i); | 1732 | set_tvnorm(btv, i); |
1733 | 1733 | ||
1734 | err: | 1734 | err: |
diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c index 613e5ae7d5ca..67b61cf3e03a 100644 --- a/drivers/media/pci/cx18/cx18-driver.c +++ b/drivers/media/pci/cx18/cx18-driver.c | |||
@@ -1243,7 +1243,7 @@ int cx18_init_on_first_open(struct cx18 *cx) | |||
1243 | in one place. */ | 1243 | in one place. */ |
1244 | cx->std++; /* Force full standard initialization */ | 1244 | cx->std++; /* Force full standard initialization */ |
1245 | std = (cx->tuner_std == V4L2_STD_ALL) ? V4L2_STD_NTSC_M : cx->tuner_std; | 1245 | std = (cx->tuner_std == V4L2_STD_ALL) ? V4L2_STD_NTSC_M : cx->tuner_std; |
1246 | cx18_s_std(NULL, &fh, &std); | 1246 | cx18_s_std(NULL, &fh, std); |
1247 | cx18_s_frequency(NULL, &fh, &vf); | 1247 | cx18_s_frequency(NULL, &fh, &vf); |
1248 | return 0; | 1248 | return 0; |
1249 | } | 1249 | } |
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 173ccd204c1f..254c50fabd73 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c | |||
@@ -637,15 +637,15 @@ static int cx18_g_std(struct file *file, void *fh, v4l2_std_id *std) | |||
637 | return 0; | 637 | return 0; |
638 | } | 638 | } |
639 | 639 | ||
640 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std) | 640 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id std) |
641 | { | 641 | { |
642 | struct cx18_open_id *id = fh2id(fh); | 642 | struct cx18_open_id *id = fh2id(fh); |
643 | struct cx18 *cx = id->cx; | 643 | struct cx18 *cx = id->cx; |
644 | 644 | ||
645 | if ((*std & V4L2_STD_ALL) == 0) | 645 | if ((std & V4L2_STD_ALL) == 0) |
646 | return -EINVAL; | 646 | return -EINVAL; |
647 | 647 | ||
648 | if (*std == cx->std) | 648 | if (std == cx->std) |
649 | return 0; | 649 | return 0; |
650 | 650 | ||
651 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || | 651 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || |
@@ -656,8 +656,8 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std) | |||
656 | return -EBUSY; | 656 | return -EBUSY; |
657 | } | 657 | } |
658 | 658 | ||
659 | cx->std = *std; | 659 | cx->std = std; |
660 | cx->is_60hz = (*std & V4L2_STD_525_60) ? 1 : 0; | 660 | cx->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0; |
661 | cx->is_50hz = !cx->is_60hz; | 661 | cx->is_50hz = !cx->is_60hz; |
662 | cx2341x_handler_set_50hz(&cx->cxhdl, cx->is_50hz); | 662 | cx2341x_handler_set_50hz(&cx->cxhdl, cx->is_50hz); |
663 | cx->cxhdl.width = 720; | 663 | cx->cxhdl.width = 720; |
diff --git a/drivers/media/pci/cx18/cx18-ioctl.h b/drivers/media/pci/cx18/cx18-ioctl.h index aa9b44a611d3..43433969d633 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.h +++ b/drivers/media/pci/cx18/cx18-ioctl.h | |||
@@ -26,6 +26,6 @@ u16 cx18_service2vbi(int type); | |||
26 | void cx18_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal); | 26 | void cx18_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal); |
27 | u16 cx18_get_service_set(struct v4l2_sliced_vbi_format *fmt); | 27 | u16 cx18_get_service_set(struct v4l2_sliced_vbi_format *fmt); |
28 | void cx18_set_funcs(struct video_device *vdev); | 28 | void cx18_set_funcs(struct video_device *vdev); |
29 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std); | 29 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id std); |
30 | int cx18_s_frequency(struct file *file, void *fh, const struct v4l2_frequency *vf); | 30 | int cx18_s_frequency(struct file *file, void *fh, const struct v4l2_frequency *vf); |
31 | int cx18_s_input(struct file *file, void *fh, unsigned int inp); | 31 | int cx18_s_input(struct file *file, void *fh, unsigned int inp); |
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 812ec5ff5939..6dea11a7a858 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c | |||
@@ -1222,14 +1222,14 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id) | |||
1222 | return 0; | 1222 | return 0; |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | 1225 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) |
1226 | { | 1226 | { |
1227 | struct cx23885_fh *fh = file->private_data; | 1227 | struct cx23885_fh *fh = file->private_data; |
1228 | struct cx23885_dev *dev = fh->dev; | 1228 | struct cx23885_dev *dev = fh->dev; |
1229 | unsigned int i; | 1229 | unsigned int i; |
1230 | 1230 | ||
1231 | for (i = 0; i < ARRAY_SIZE(cx23885_tvnorms); i++) | 1231 | for (i = 0; i < ARRAY_SIZE(cx23885_tvnorms); i++) |
1232 | if (*id & cx23885_tvnorms[i].id) | 1232 | if (id & cx23885_tvnorms[i].id) |
1233 | break; | 1233 | break; |
1234 | if (i == ARRAY_SIZE(cx23885_tvnorms)) | 1234 | if (i == ARRAY_SIZE(cx23885_tvnorms)) |
1235 | return -EINVAL; | 1235 | return -EINVAL; |
@@ -1237,7 +1237,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | |||
1237 | 1237 | ||
1238 | /* Have the drier core notify the subdevices */ | 1238 | /* Have the drier core notify the subdevices */ |
1239 | mutex_lock(&dev->lock); | 1239 | mutex_lock(&dev->lock); |
1240 | cx23885_set_tvnorm(dev, *id); | 1240 | cx23885_set_tvnorm(dev, id); |
1241 | mutex_unlock(&dev->lock); | 1241 | mutex_unlock(&dev->lock); |
1242 | 1242 | ||
1243 | return 0; | 1243 | return 0; |
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 2bbda43eb00e..ed08c89adde0 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c | |||
@@ -1259,13 +1259,13 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id) | |||
1259 | return 0; | 1259 | return 0; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *tvnorms) | 1262 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id tvnorms) |
1263 | { | 1263 | { |
1264 | struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev; | 1264 | struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev; |
1265 | dprintk(1, "%s()\n", __func__); | 1265 | dprintk(1, "%s()\n", __func__); |
1266 | 1266 | ||
1267 | mutex_lock(&dev->lock); | 1267 | mutex_lock(&dev->lock); |
1268 | cx23885_set_tvnorm(dev, *tvnorms); | 1268 | cx23885_set_tvnorm(dev, tvnorms); |
1269 | mutex_unlock(&dev->lock); | 1269 | mutex_unlock(&dev->lock); |
1270 | 1270 | ||
1271 | return 0; | 1271 | return 0; |
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 75281c1530d8..93c7d576199b 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c | |||
@@ -1203,7 +1203,7 @@ int cx25821_vidioc_s_priority(struct file *file, void *f, | |||
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | #ifdef TUNER_FLAG | 1205 | #ifdef TUNER_FLAG |
1206 | int cx25821_vidioc_s_std(struct file *file, void *priv, v4l2_std_id * tvnorms) | 1206 | int cx25821_vidioc_s_std(struct file *file, void *priv, v4l2_std_id tvnorms) |
1207 | { | 1207 | { |
1208 | struct cx25821_fh *fh = priv; | 1208 | struct cx25821_fh *fh = priv; |
1209 | struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev; | 1209 | struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev; |
@@ -1218,11 +1218,11 @@ int cx25821_vidioc_s_std(struct file *file, void *priv, v4l2_std_id * tvnorms) | |||
1218 | return err; | 1218 | return err; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | if (dev->tvnorm == *tvnorms) | 1221 | if (dev->tvnorm == tvnorms) |
1222 | return 0; | 1222 | return 0; |
1223 | 1223 | ||
1224 | mutex_lock(&dev->lock); | 1224 | mutex_lock(&dev->lock); |
1225 | cx25821_set_tvnorm(dev, *tvnorms); | 1225 | cx25821_set_tvnorm(dev, tvnorms); |
1226 | mutex_unlock(&dev->lock); | 1226 | mutex_unlock(&dev->lock); |
1227 | 1227 | ||
1228 | medusa_set_videostandard(dev); | 1228 | medusa_set_videostandard(dev); |
diff --git a/drivers/media/pci/cx25821/cx25821-video.h b/drivers/media/pci/cx25821/cx25821-video.h index f0e70ffbedd4..239f63c12f33 100644 --- a/drivers/media/pci/cx25821/cx25821-video.h +++ b/drivers/media/pci/cx25821/cx25821-video.h | |||
@@ -135,7 +135,7 @@ extern int cx25821_vidioc_querybuf(struct file *file, void *priv, | |||
135 | extern int cx25821_vidioc_qbuf(struct file *file, void *priv, | 135 | extern int cx25821_vidioc_qbuf(struct file *file, void *priv, |
136 | struct v4l2_buffer *p); | 136 | struct v4l2_buffer *p); |
137 | extern int cx25821_vidioc_s_std(struct file *file, void *priv, | 137 | extern int cx25821_vidioc_s_std(struct file *file, void *priv, |
138 | v4l2_std_id *tvnorms); | 138 | v4l2_std_id tvnorms); |
139 | extern int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i); | 139 | extern int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i); |
140 | extern int cx25821_vidioc_enum_input(struct file *file, void *priv, | 140 | extern int cx25821_vidioc_enum_input(struct file *file, void *priv, |
141 | struct v4l2_input *i); | 141 | struct v4l2_input *i); |
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 486ca8d5f2a0..150bb76e7839 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c | |||
@@ -939,12 +939,12 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *tvnorm) | |||
939 | return 0; | 939 | return 0; |
940 | } | 940 | } |
941 | 941 | ||
942 | static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id) | 942 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) |
943 | { | 943 | { |
944 | struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; | 944 | struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; |
945 | 945 | ||
946 | mutex_lock(&core->lock); | 946 | mutex_lock(&core->lock); |
947 | cx88_set_tvnorm(core,*id); | 947 | cx88_set_tvnorm(core, id); |
948 | mutex_unlock(&core->lock); | 948 | mutex_unlock(&core->lock); |
949 | return 0; | 949 | return 0; |
950 | } | 950 | } |
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index ede6f139b5cc..ead5be58303d 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
@@ -1193,12 +1193,12 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *tvnorm) | |||
1193 | return 0; | 1193 | return 0; |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *tvnorms) | 1196 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id tvnorms) |
1197 | { | 1197 | { |
1198 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; | 1198 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; |
1199 | 1199 | ||
1200 | mutex_lock(&core->lock); | 1200 | mutex_lock(&core->lock); |
1201 | cx88_set_tvnorm(core,*tvnorms); | 1201 | cx88_set_tvnorm(core, tvnorms); |
1202 | mutex_unlock(&core->lock); | 1202 | mutex_unlock(&core->lock); |
1203 | 1203 | ||
1204 | return 0; | 1204 | return 0; |
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 2928e7287da8..07b8460953b6 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c | |||
@@ -1387,7 +1387,7 @@ int ivtv_init_on_first_open(struct ivtv *itv) | |||
1387 | if (!itv->has_cx23415) | 1387 | if (!itv->has_cx23415) |
1388 | write_reg_sync(0x03, IVTV_REG_DMACONTROL); | 1388 | write_reg_sync(0x03, IVTV_REG_DMACONTROL); |
1389 | 1389 | ||
1390 | ivtv_s_std_enc(itv, &itv->tuner_std); | 1390 | ivtv_s_std_enc(itv, itv->tuner_std); |
1391 | 1391 | ||
1392 | /* Default interrupts enabled. For the PVR350 this includes the | 1392 | /* Default interrupts enabled. For the PVR350 this includes the |
1393 | decoder VSYNC interrupt, which is always on. It is not only used | 1393 | decoder VSYNC interrupt, which is always on. It is not only used |
@@ -1397,7 +1397,7 @@ int ivtv_init_on_first_open(struct ivtv *itv) | |||
1397 | if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { | 1397 | if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { |
1398 | ivtv_clear_irq_mask(itv, IVTV_IRQ_MASK_INIT | IVTV_IRQ_DEC_VSYNC); | 1398 | ivtv_clear_irq_mask(itv, IVTV_IRQ_MASK_INIT | IVTV_IRQ_DEC_VSYNC); |
1399 | ivtv_set_osd_alpha(itv); | 1399 | ivtv_set_osd_alpha(itv); |
1400 | ivtv_s_std_dec(itv, &itv->tuner_std); | 1400 | ivtv_s_std_dec(itv, itv->tuner_std); |
1401 | } else { | 1401 | } else { |
1402 | ivtv_clear_irq_mask(itv, IVTV_IRQ_MASK_INIT); | 1402 | ivtv_clear_irq_mask(itv, IVTV_IRQ_MASK_INIT); |
1403 | } | 1403 | } |
diff --git a/drivers/media/pci/ivtv/ivtv-firmware.c b/drivers/media/pci/ivtv/ivtv-firmware.c index 68387d4369d6..ed73edd2bcd3 100644 --- a/drivers/media/pci/ivtv/ivtv-firmware.c +++ b/drivers/media/pci/ivtv/ivtv-firmware.c | |||
@@ -302,7 +302,7 @@ static int ivtv_firmware_restart(struct ivtv *itv) | |||
302 | /* Restore encoder video standard */ | 302 | /* Restore encoder video standard */ |
303 | std = itv->std; | 303 | std = itv->std; |
304 | itv->std = 0; | 304 | itv->std = 0; |
305 | ivtv_s_std_enc(itv, &std); | 305 | ivtv_s_std_enc(itv, std); |
306 | 306 | ||
307 | if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { | 307 | if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { |
308 | ivtv_init_mpeg_decoder(itv); | 308 | ivtv_init_mpeg_decoder(itv); |
@@ -310,7 +310,7 @@ static int ivtv_firmware_restart(struct ivtv *itv) | |||
310 | /* Restore decoder video standard */ | 310 | /* Restore decoder video standard */ |
311 | std = itv->std_out; | 311 | std = itv->std_out; |
312 | itv->std_out = 0; | 312 | itv->std_out = 0; |
313 | ivtv_s_std_dec(itv, &std); | 313 | ivtv_s_std_dec(itv, std); |
314 | 314 | ||
315 | /* Restore framebuffer if active */ | 315 | /* Restore framebuffer if active */ |
316 | if (itv->ivtvfb_restore) | 316 | if (itv->ivtvfb_restore) |
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 852f11e0d636..080f179070a6 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c | |||
@@ -1103,10 +1103,10 @@ static int ivtv_g_std(struct file *file, void *fh, v4l2_std_id *std) | |||
1103 | return 0; | 1103 | return 0; |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id *std) | 1106 | void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id std) |
1107 | { | 1107 | { |
1108 | itv->std = *std; | 1108 | itv->std = std; |
1109 | itv->is_60hz = (*std & V4L2_STD_525_60) ? 1 : 0; | 1109 | itv->is_60hz = (std & V4L2_STD_525_60) ? 1 : 0; |
1110 | itv->is_50hz = !itv->is_60hz; | 1110 | itv->is_50hz = !itv->is_60hz; |
1111 | cx2341x_handler_set_50hz(&itv->cxhdl, itv->is_50hz); | 1111 | cx2341x_handler_set_50hz(&itv->cxhdl, itv->is_50hz); |
1112 | itv->cxhdl.width = 720; | 1112 | itv->cxhdl.width = 720; |
@@ -1122,15 +1122,15 @@ void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id *std) | |||
1122 | ivtv_call_all(itv, core, s_std, itv->std); | 1122 | ivtv_call_all(itv, core, s_std, itv->std); |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id *std) | 1125 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std) |
1126 | { | 1126 | { |
1127 | struct yuv_playback_info *yi = &itv->yuv_info; | 1127 | struct yuv_playback_info *yi = &itv->yuv_info; |
1128 | DEFINE_WAIT(wait); | 1128 | DEFINE_WAIT(wait); |
1129 | int f; | 1129 | int f; |
1130 | 1130 | ||
1131 | /* set display standard */ | 1131 | /* set display standard */ |
1132 | itv->std_out = *std; | 1132 | itv->std_out = std; |
1133 | itv->is_out_60hz = (*std & V4L2_STD_525_60) ? 1 : 0; | 1133 | itv->is_out_60hz = (std & V4L2_STD_525_60) ? 1 : 0; |
1134 | itv->is_out_50hz = !itv->is_out_60hz; | 1134 | itv->is_out_50hz = !itv->is_out_60hz; |
1135 | ivtv_call_all(itv, video, s_std_output, itv->std_out); | 1135 | ivtv_call_all(itv, video, s_std_output, itv->std_out); |
1136 | 1136 | ||
@@ -1168,14 +1168,14 @@ void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id *std) | |||
1168 | } | 1168 | } |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | static int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std) | 1171 | static int ivtv_s_std(struct file *file, void *fh, v4l2_std_id std) |
1172 | { | 1172 | { |
1173 | struct ivtv *itv = fh2id(fh)->itv; | 1173 | struct ivtv *itv = fh2id(fh)->itv; |
1174 | 1174 | ||
1175 | if ((*std & V4L2_STD_ALL) == 0) | 1175 | if ((std & V4L2_STD_ALL) == 0) |
1176 | return -EINVAL; | 1176 | return -EINVAL; |
1177 | 1177 | ||
1178 | if (*std == itv->std) | 1178 | if (std == itv->std) |
1179 | return 0; | 1179 | return 0; |
1180 | 1180 | ||
1181 | if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) || | 1181 | if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) || |
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.h b/drivers/media/pci/ivtv/ivtv-ioctl.h index 34c6bc132ebd..75c397756116 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.h +++ b/drivers/media/pci/ivtv/ivtv-ioctl.h | |||
@@ -27,8 +27,8 @@ u16 ivtv_get_service_set(struct v4l2_sliced_vbi_format *fmt); | |||
27 | void ivtv_set_osd_alpha(struct ivtv *itv); | 27 | void ivtv_set_osd_alpha(struct ivtv *itv); |
28 | int ivtv_set_speed(struct ivtv *itv, int speed); | 28 | int ivtv_set_speed(struct ivtv *itv, int speed); |
29 | void ivtv_set_funcs(struct video_device *vdev); | 29 | void ivtv_set_funcs(struct video_device *vdev); |
30 | void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id *std); | 30 | void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id std); |
31 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id *std); | 31 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std); |
32 | int ivtv_s_frequency(struct file *file, void *fh, const struct v4l2_frequency *vf); | 32 | int ivtv_s_frequency(struct file *file, void *fh, const struct v4l2_frequency *vf); |
33 | int ivtv_s_input(struct file *file, void *fh, unsigned int inp); | 33 | int ivtv_s_input(struct file *file, void *fh, unsigned int inp); |
34 | 34 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c index 4df79c656909..66a70814004c 100644 --- a/drivers/media/pci/saa7134/saa7134-empress.c +++ b/drivers/media/pci/saa7134/saa7134-empress.c | |||
@@ -428,7 +428,7 @@ static int empress_g_chip_ident(struct file *file, void *fh, | |||
428 | return -EINVAL; | 428 | return -EINVAL; |
429 | } | 429 | } |
430 | 430 | ||
431 | static int empress_s_std(struct file *file, void *priv, v4l2_std_id *id) | 431 | static int empress_s_std(struct file *file, void *priv, v4l2_std_id id) |
432 | { | 432 | { |
433 | struct saa7134_dev *dev = file->private_data; | 433 | struct saa7134_dev *dev = file->private_data; |
434 | 434 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 1e23547531b9..a6c69a4c7fbd 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c | |||
@@ -1828,7 +1828,7 @@ static int saa7134_querycap(struct file *file, void *priv, | |||
1828 | return 0; | 1828 | return 0; |
1829 | } | 1829 | } |
1830 | 1830 | ||
1831 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id *id) | 1831 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id id) |
1832 | { | 1832 | { |
1833 | unsigned long flags; | 1833 | unsigned long flags; |
1834 | unsigned int i; | 1834 | unsigned int i; |
@@ -1849,17 +1849,17 @@ int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_ | |||
1849 | } | 1849 | } |
1850 | 1850 | ||
1851 | for (i = 0; i < TVNORMS; i++) | 1851 | for (i = 0; i < TVNORMS; i++) |
1852 | if (*id == tvnorms[i].id) | 1852 | if (id == tvnorms[i].id) |
1853 | break; | 1853 | break; |
1854 | 1854 | ||
1855 | if (i == TVNORMS) | 1855 | if (i == TVNORMS) |
1856 | for (i = 0; i < TVNORMS; i++) | 1856 | for (i = 0; i < TVNORMS; i++) |
1857 | if (*id & tvnorms[i].id) | 1857 | if (id & tvnorms[i].id) |
1858 | break; | 1858 | break; |
1859 | if (i == TVNORMS) | 1859 | if (i == TVNORMS) |
1860 | return -EINVAL; | 1860 | return -EINVAL; |
1861 | 1861 | ||
1862 | if ((*id & V4L2_STD_SECAM) && (secam[0] != '-')) { | 1862 | if ((id & V4L2_STD_SECAM) && (secam[0] != '-')) { |
1863 | if (secam[0] == 'L' || secam[0] == 'l') { | 1863 | if (secam[0] == 'L' || secam[0] == 'l') { |
1864 | if (secam[1] == 'C' || secam[1] == 'c') | 1864 | if (secam[1] == 'C' || secam[1] == 'c') |
1865 | fixup = V4L2_STD_SECAM_LC; | 1865 | fixup = V4L2_STD_SECAM_LC; |
@@ -1879,7 +1879,7 @@ int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_ | |||
1879 | return -EINVAL; | 1879 | return -EINVAL; |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | *id = tvnorms[i].id; | 1882 | id = tvnorms[i].id; |
1883 | 1883 | ||
1884 | mutex_lock(&dev->lock); | 1884 | mutex_lock(&dev->lock); |
1885 | if (fh && res_check(fh, RESOURCE_OVERLAY)) { | 1885 | if (fh && res_check(fh, RESOURCE_OVERLAY)) { |
@@ -1901,7 +1901,7 @@ int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_ | |||
1901 | } | 1901 | } |
1902 | EXPORT_SYMBOL_GPL(saa7134_s_std_internal); | 1902 | EXPORT_SYMBOL_GPL(saa7134_s_std_internal); |
1903 | 1903 | ||
1904 | static int saa7134_s_std(struct file *file, void *priv, v4l2_std_id *id) | 1904 | static int saa7134_s_std(struct file *file, void *priv, v4l2_std_id id) |
1905 | { | 1905 | { |
1906 | struct saa7134_fh *fh = priv; | 1906 | struct saa7134_fh *fh = priv; |
1907 | 1907 | ||
@@ -2396,7 +2396,7 @@ static int radio_s_input(struct file *filp, void *priv, unsigned int i) | |||
2396 | return 0; | 2396 | return 0; |
2397 | } | 2397 | } |
2398 | 2398 | ||
2399 | static int radio_s_std(struct file *file, void *fh, v4l2_std_id *norm) | 2399 | static int radio_s_std(struct file *file, void *fh, v4l2_std_id norm) |
2400 | { | 2400 | { |
2401 | return 0; | 2401 | return 0; |
2402 | } | 2402 | } |
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 71eefef5e324..62169dd74c6a 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h | |||
@@ -766,7 +766,7 @@ extern struct video_device saa7134_radio_template; | |||
766 | int saa7134_s_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); | 766 | int saa7134_s_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); |
767 | int saa7134_g_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); | 767 | int saa7134_g_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); |
768 | int saa7134_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c); | 768 | int saa7134_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c); |
769 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id *id); | 769 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id id); |
770 | 770 | ||
771 | int saa7134_videoport_init(struct saa7134_dev *dev); | 771 | int saa7134_videoport_init(struct saa7134_dev *dev); |
772 | void saa7134_set_tvnorm_hw(struct saa7134_dev *dev); | 772 | void saa7134_set_tvnorm_hw(struct saa7134_dev *dev); |
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index e7fbd036ba44..538de52b9cfd 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c | |||
@@ -211,17 +211,17 @@ static int saa7164_encoder_initialize(struct saa7164_port *port) | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /* -- V4L2 --------------------------------------------------------- */ | 213 | /* -- V4L2 --------------------------------------------------------- */ |
214 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | 214 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) |
215 | { | 215 | { |
216 | struct saa7164_encoder_fh *fh = file->private_data; | 216 | struct saa7164_encoder_fh *fh = file->private_data; |
217 | struct saa7164_port *port = fh->port; | 217 | struct saa7164_port *port = fh->port; |
218 | struct saa7164_dev *dev = port->dev; | 218 | struct saa7164_dev *dev = port->dev; |
219 | unsigned int i; | 219 | unsigned int i; |
220 | 220 | ||
221 | dprintk(DBGLVL_ENC, "%s(id=0x%x)\n", __func__, (u32)*id); | 221 | dprintk(DBGLVL_ENC, "%s(id=0x%x)\n", __func__, (u32)id); |
222 | 222 | ||
223 | for (i = 0; i < ARRAY_SIZE(saa7164_tvnorms); i++) { | 223 | for (i = 0; i < ARRAY_SIZE(saa7164_tvnorms); i++) { |
224 | if (*id & saa7164_tvnorms[i].id) | 224 | if (id & saa7164_tvnorms[i].id) |
225 | break; | 225 | break; |
226 | } | 226 | } |
227 | if (i == ARRAY_SIZE(saa7164_tvnorms)) | 227 | if (i == ARRAY_SIZE(saa7164_tvnorms)) |
@@ -234,7 +234,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | |||
234 | */ | 234 | */ |
235 | saa7164_api_set_audio_std(port); | 235 | saa7164_api_set_audio_std(port); |
236 | 236 | ||
237 | dprintk(DBGLVL_ENC, "%s(id=0x%x) OK\n", __func__, (u32)*id); | 237 | dprintk(DBGLVL_ENC, "%s(id=0x%x) OK\n", __func__, (u32)id); |
238 | 238 | ||
239 | return 0; | 239 | return 0; |
240 | } | 240 | } |
diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c index bfc8cec110de..da224eb39b95 100644 --- a/drivers/media/pci/saa7164/saa7164-vbi.c +++ b/drivers/media/pci/saa7164/saa7164-vbi.c | |||
@@ -183,17 +183,17 @@ static int saa7164_vbi_initialize(struct saa7164_port *port) | |||
183 | } | 183 | } |
184 | 184 | ||
185 | /* -- V4L2 --------------------------------------------------------- */ | 185 | /* -- V4L2 --------------------------------------------------------- */ |
186 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | 186 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) |
187 | { | 187 | { |
188 | struct saa7164_vbi_fh *fh = file->private_data; | 188 | struct saa7164_vbi_fh *fh = file->private_data; |
189 | struct saa7164_port *port = fh->port; | 189 | struct saa7164_port *port = fh->port; |
190 | struct saa7164_dev *dev = port->dev; | 190 | struct saa7164_dev *dev = port->dev; |
191 | unsigned int i; | 191 | unsigned int i; |
192 | 192 | ||
193 | dprintk(DBGLVL_VBI, "%s(id=0x%x)\n", __func__, (u32)*id); | 193 | dprintk(DBGLVL_VBI, "%s(id=0x%x)\n", __func__, (u32)id); |
194 | 194 | ||
195 | for (i = 0; i < ARRAY_SIZE(saa7164_tvnorms); i++) { | 195 | for (i = 0; i < ARRAY_SIZE(saa7164_tvnorms); i++) { |
196 | if (*id & saa7164_tvnorms[i].id) | 196 | if (id & saa7164_tvnorms[i].id) |
197 | break; | 197 | break; |
198 | } | 198 | } |
199 | if (i == ARRAY_SIZE(saa7164_tvnorms)) | 199 | if (i == ARRAY_SIZE(saa7164_tvnorms)) |
@@ -206,7 +206,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) | |||
206 | */ | 206 | */ |
207 | saa7164_api_set_audio_std(port); | 207 | saa7164_api_set_audio_std(port); |
208 | 208 | ||
209 | dprintk(DBGLVL_VBI, "%s(id=0x%x) OK\n", __func__, (u32)*id); | 209 | dprintk(DBGLVL_VBI, "%s(id=0x%x) OK\n", __func__, (u32)id); |
210 | 210 | ||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 4b703fe8c953..7005695aa4bd 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c | |||
@@ -439,22 +439,22 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
439 | * | 439 | * |
440 | * other, returned from video DAC. | 440 | * other, returned from video DAC. |
441 | */ | 441 | */ |
442 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std) | 442 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std) |
443 | { | 443 | { |
444 | struct sta2x11_vip *vip = video_drvdata(file); | 444 | struct sta2x11_vip *vip = video_drvdata(file); |
445 | v4l2_std_id oldstd = vip->std, newstd; | 445 | v4l2_std_id oldstd = vip->std, newstd; |
446 | int status; | 446 | int status; |
447 | 447 | ||
448 | if (V4L2_STD_ALL == *std) { | 448 | if (V4L2_STD_ALL == std) { |
449 | v4l2_subdev_call(vip->decoder, core, s_std, *std); | 449 | v4l2_subdev_call(vip->decoder, core, s_std, std); |
450 | ssleep(2); | 450 | ssleep(2); |
451 | v4l2_subdev_call(vip->decoder, video, querystd, &newstd); | 451 | v4l2_subdev_call(vip->decoder, video, querystd, &newstd); |
452 | v4l2_subdev_call(vip->decoder, video, g_input_status, &status); | 452 | v4l2_subdev_call(vip->decoder, video, g_input_status, &status); |
453 | if (status & V4L2_IN_ST_NO_SIGNAL) | 453 | if (status & V4L2_IN_ST_NO_SIGNAL) |
454 | return -EIO; | 454 | return -EIO; |
455 | *std = vip->std = newstd; | 455 | std = vip->std = newstd; |
456 | if (oldstd != *std) { | 456 | if (oldstd != std) { |
457 | if (V4L2_STD_525_60 & (*std)) | 457 | if (V4L2_STD_525_60 & std) |
458 | vip->format = formats_60[0]; | 458 | vip->format = formats_60[0]; |
459 | else | 459 | else |
460 | vip->format = formats_50[0]; | 460 | vip->format = formats_50[0]; |
@@ -462,14 +462,14 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std) | |||
462 | return 0; | 462 | return 0; |
463 | } | 463 | } |
464 | 464 | ||
465 | if (oldstd != *std) { | 465 | if (oldstd != std) { |
466 | if (V4L2_STD_525_60 & (*std)) | 466 | if (V4L2_STD_525_60 & std) |
467 | vip->format = formats_60[0]; | 467 | vip->format = formats_60[0]; |
468 | else | 468 | else |
469 | vip->format = formats_50[0]; | 469 | vip->format = formats_50[0]; |
470 | } | 470 | } |
471 | 471 | ||
472 | return v4l2_subdev_call(vip->decoder, core, s_std, *std); | 472 | return v4l2_subdev_call(vip->decoder, core, s_std, std); |
473 | } | 473 | } |
474 | 474 | ||
475 | /** | 475 | /** |
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 2e8f518f298f..1168a84a737d 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c | |||
@@ -2435,14 +2435,14 @@ static int zoran_g_std(struct file *file, void *__fh, v4l2_std_id *std) | |||
2435 | return 0; | 2435 | return 0; |
2436 | } | 2436 | } |
2437 | 2437 | ||
2438 | static int zoran_s_std(struct file *file, void *__fh, v4l2_std_id *std) | 2438 | static int zoran_s_std(struct file *file, void *__fh, v4l2_std_id std) |
2439 | { | 2439 | { |
2440 | struct zoran_fh *fh = __fh; | 2440 | struct zoran_fh *fh = __fh; |
2441 | struct zoran *zr = fh->zr; | 2441 | struct zoran *zr = fh->zr; |
2442 | int res = 0; | 2442 | int res = 0; |
2443 | 2443 | ||
2444 | mutex_lock(&zr->resource_lock); | 2444 | mutex_lock(&zr->resource_lock); |
2445 | res = zoran_set_norm(zr, *std); | 2445 | res = zoran_set_norm(zr, std); |
2446 | if (res) | 2446 | if (res) |
2447 | goto sstd_unlock_and_return; | 2447 | goto sstd_unlock_and_return; |
2448 | 2448 | ||