summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/s2255
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-15 06:10:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-24 06:47:00 -0300
commit314527acbbb3f33f72c2ef19d8cfabcada9912a5 (patch)
tree871021b9e888444f9f71f5c12ecf0272d77fdf8d /drivers/media/usb/s2255
parent2f73c7c582a685b3198b974cd6d964d0338f8ab5 (diff)
downloadblackbird-op-linux-314527acbbb3f33f72c2ef19d8cfabcada9912a5.tar.gz
blackbird-op-linux-314527acbbb3f33f72c2ef19d8cfabcada9912a5.zip
[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/usb/s2255')
-rw-r--r--drivers/media/usb/s2255/s2255drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 2bd86132d3e3..ab97e7d0b4f2 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1294,7 +1294,7 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
return 0;
}
-static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *i)
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id i)
{
struct s2255_fh *fh = priv;
struct s2255_mode mode;
@@ -1314,7 +1314,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *i)
goto out_s_std;
}
mode = fh->channel->mode;
- if (*i & V4L2_STD_525_60) {
+ if (i & V4L2_STD_525_60) {
dprintk(4, "%s 60 Hz\n", __func__);
/* if changing format, reset frame decimation/intervals */
if (mode.format != FORMAT_NTSC) {
@@ -1324,7 +1324,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *i)
channel->width = LINE_SZ_4CIFS_NTSC;
channel->height = NUM_LINES_4CIFS_NTSC * 2;
}
- } else if (*i & V4L2_STD_625_50) {
+ } else if (i & V4L2_STD_625_50) {
dprintk(4, "%s 50 Hz\n", __func__);
if (mode.format != FORMAT_PAL) {
mode.restart = 1;
@@ -1337,7 +1337,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *i)
ret = -EINVAL;
goto out_s_std;
}
- fh->channel->std = *i;
+ fh->channel->std = i;
if (mode.restart)
s2255_set_mode(fh->channel, &mode);
out_s_std:
OpenPOWER on IntegriCloud