[media] v4l2: make vidioc_s_jpegcomp const
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_jpegcomp. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
e6eb28c220
commit
d88aab53bd
@@ -2674,7 +2674,7 @@ static int zoran_g_jpegcomp(struct file *file, void *__fh,
|
||||
}
|
||||
|
||||
static int zoran_s_jpegcomp(struct file *file, void *__fh,
|
||||
struct v4l2_jpegcompression *params)
|
||||
const struct v4l2_jpegcompression *params)
|
||||
{
|
||||
struct zoran_fh *fh = __fh;
|
||||
struct zoran *zr = fh->zr;
|
||||
@@ -2701,7 +2701,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh,
|
||||
if (!fh->buffers.allocated)
|
||||
fh->buffers.buffer_size =
|
||||
zoran_v4l2_calc_bufsize(&fh->jpg_settings);
|
||||
fh->jpg_settings.jpg_comp = *params = settings.jpg_comp;
|
||||
fh->jpg_settings.jpg_comp = settings.jpg_comp;
|
||||
sjpegc_unlock_and_return:
|
||||
mutex_unlock(&zr->resource_lock);
|
||||
|
||||
|
Reference in New Issue
Block a user