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/zoran | |
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/zoran')
-rw-r--r-- | drivers/media/pci/zoran/zoran_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 | ||