mirror of https://github.com/torvalds/linux.git
media: uvcvideo: Rename second ioctl handlers argument to 'void *priv'
The second argument to the ioctl handlers is not a file handle any more. Rename it from 'void *fh' to 'void *priv', to avoid misconceptions. This is particularly important in the uvcvideo driver, as it is widely used and can be taken as an example for new drivers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
bb74fac758
commit
0960b6937b
|
|
@ -23,7 +23,7 @@
|
|||
* V4L2 ioctls
|
||||
*/
|
||||
|
||||
static int uvc_meta_v4l2_querycap(struct file *file, void *fh,
|
||||
static int uvc_meta_v4l2_querycap(struct file *file, void *priv,
|
||||
struct v4l2_capability *cap)
|
||||
{
|
||||
struct v4l2_fh *vfh = file_to_v4l2_fh(file);
|
||||
|
|
@ -39,7 +39,7 @@ static int uvc_meta_v4l2_querycap(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_meta_v4l2_get_format(struct file *file, void *fh,
|
||||
static int uvc_meta_v4l2_get_format(struct file *file, void *priv,
|
||||
struct v4l2_format *format)
|
||||
{
|
||||
struct v4l2_fh *vfh = file_to_v4l2_fh(file);
|
||||
|
|
@ -57,7 +57,7 @@ static int uvc_meta_v4l2_get_format(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_meta_v4l2_try_format(struct file *file, void *fh,
|
||||
static int uvc_meta_v4l2_try_format(struct file *file, void *priv,
|
||||
struct v4l2_format *format)
|
||||
{
|
||||
struct v4l2_fh *vfh = file_to_v4l2_fh(file);
|
||||
|
|
@ -83,7 +83,7 @@ static int uvc_meta_v4l2_try_format(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_meta_v4l2_set_format(struct file *file, void *fh,
|
||||
static int uvc_meta_v4l2_set_format(struct file *file, void *priv,
|
||||
struct v4l2_format *format)
|
||||
{
|
||||
struct v4l2_fh *vfh = file_to_v4l2_fh(file);
|
||||
|
|
@ -91,7 +91,7 @@ static int uvc_meta_v4l2_set_format(struct file *file, void *fh,
|
|||
struct v4l2_meta_format *fmt = &format->fmt.meta;
|
||||
int ret;
|
||||
|
||||
ret = uvc_meta_v4l2_try_format(file, fh, format);
|
||||
ret = uvc_meta_v4l2_try_format(file, priv, format);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ static int uvc_meta_v4l2_set_format(struct file *file, void *fh,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_meta_v4l2_enum_formats(struct file *file, void *fh,
|
||||
static int uvc_meta_v4l2_enum_formats(struct file *file, void *priv,
|
||||
struct v4l2_fmtdesc *fdesc)
|
||||
{
|
||||
struct v4l2_fh *vfh = file_to_v4l2_fh(file);
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_g_fmt(struct file *file, void *fh,
|
||||
static int uvc_ioctl_g_fmt(struct file *file, void *priv,
|
||||
struct v4l2_format *fmt)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -424,7 +424,7 @@ static int uvc_ioctl_g_fmt(struct file *file, void *fh,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_s_fmt(struct file *file, void *fh,
|
||||
static int uvc_ioctl_s_fmt(struct file *file, void *priv,
|
||||
struct v4l2_format *fmt)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -456,7 +456,7 @@ static int uvc_ioctl_s_fmt(struct file *file, void *fh,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_g_parm(struct file *file, void *fh,
|
||||
static int uvc_ioctl_g_parm(struct file *file, void *priv,
|
||||
struct v4l2_streamparm *parm)
|
||||
{
|
||||
u32 numerator, denominator;
|
||||
|
|
@ -493,7 +493,7 @@ static int uvc_ioctl_g_parm(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_s_parm(struct file *file, void *fh,
|
||||
static int uvc_ioctl_s_parm(struct file *file, void *priv,
|
||||
struct v4l2_streamparm *parm)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -622,7 +622,7 @@ static int uvc_v4l2_release(struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_querycap(struct file *file, void *fh,
|
||||
static int uvc_ioctl_querycap(struct file *file, void *priv,
|
||||
struct v4l2_capability *cap)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -638,7 +638,7 @@ static int uvc_ioctl_querycap(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_enum_fmt(struct file *file, void *fh,
|
||||
static int uvc_ioctl_enum_fmt(struct file *file, void *priv,
|
||||
struct v4l2_fmtdesc *fmt)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -662,7 +662,7 @@ static int uvc_ioctl_enum_fmt(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_try_fmt(struct file *file, void *fh,
|
||||
static int uvc_ioctl_try_fmt(struct file *file, void *priv,
|
||||
struct v4l2_format *fmt)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -672,7 +672,7 @@ static int uvc_ioctl_try_fmt(struct file *file, void *fh,
|
|||
return uvc_v4l2_try_format(stream, fmt, &probe, NULL, NULL);
|
||||
}
|
||||
|
||||
static int uvc_ioctl_enum_input(struct file *file, void *fh,
|
||||
static int uvc_ioctl_enum_input(struct file *file, void *priv,
|
||||
struct v4l2_input *input)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -715,7 +715,7 @@ static int uvc_ioctl_enum_input(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_g_input(struct file *file, void *fh, unsigned int *input)
|
||||
static int uvc_ioctl_g_input(struct file *file, void *priv, unsigned int *input)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
struct uvc_video_chain *chain = handle->chain;
|
||||
|
|
@ -743,7 +743,7 @@ static int uvc_ioctl_g_input(struct file *file, void *fh, unsigned int *input)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_s_input(struct file *file, void *fh, unsigned int input)
|
||||
static int uvc_ioctl_s_input(struct file *file, void *priv, unsigned int input)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
struct uvc_streaming *stream = handle->stream;
|
||||
|
|
@ -777,7 +777,7 @@ static int uvc_ioctl_s_input(struct file *file, void *fh, unsigned int input)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_query_ext_ctrl(struct file *file, void *fh,
|
||||
static int uvc_ioctl_query_ext_ctrl(struct file *file, void *priv,
|
||||
struct v4l2_query_ext_ctrl *qec)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -805,7 +805,7 @@ static int uvc_ctrl_check_access(struct uvc_video_chain *chain,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_g_ext_ctrls(struct file *file, void *fh,
|
||||
static int uvc_ioctl_g_ext_ctrls(struct file *file, void *priv,
|
||||
struct v4l2_ext_controls *ctrls)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -889,7 +889,7 @@ static int uvc_ioctl_s_try_ext_ctrls(struct uvc_fh *handle,
|
|||
return uvc_ctrl_rollback(handle);
|
||||
}
|
||||
|
||||
static int uvc_ioctl_s_ext_ctrls(struct file *file, void *fh,
|
||||
static int uvc_ioctl_s_ext_ctrls(struct file *file, void *priv,
|
||||
struct v4l2_ext_controls *ctrls)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -897,7 +897,7 @@ static int uvc_ioctl_s_ext_ctrls(struct file *file, void *fh,
|
|||
return uvc_ioctl_s_try_ext_ctrls(handle, ctrls, VIDIOC_S_EXT_CTRLS);
|
||||
}
|
||||
|
||||
static int uvc_ioctl_try_ext_ctrls(struct file *file, void *fh,
|
||||
static int uvc_ioctl_try_ext_ctrls(struct file *file, void *priv,
|
||||
struct v4l2_ext_controls *ctrls)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -905,7 +905,7 @@ static int uvc_ioctl_try_ext_ctrls(struct file *file, void *fh,
|
|||
return uvc_ioctl_s_try_ext_ctrls(handle, ctrls, VIDIOC_TRY_EXT_CTRLS);
|
||||
}
|
||||
|
||||
static int uvc_ioctl_querymenu(struct file *file, void *fh,
|
||||
static int uvc_ioctl_querymenu(struct file *file, void *priv,
|
||||
struct v4l2_querymenu *qm)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -914,7 +914,7 @@ static int uvc_ioctl_querymenu(struct file *file, void *fh,
|
|||
return uvc_query_v4l2_menu(chain, qm);
|
||||
}
|
||||
|
||||
static int uvc_ioctl_g_selection(struct file *file, void *fh,
|
||||
static int uvc_ioctl_g_selection(struct file *file, void *priv,
|
||||
struct v4l2_selection *sel)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -948,7 +948,7 @@ static int uvc_ioctl_g_selection(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_enum_framesizes(struct file *file, void *fh,
|
||||
static int uvc_ioctl_enum_framesizes(struct file *file, void *priv,
|
||||
struct v4l2_frmsizeenum *fsize)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -988,7 +988,7 @@ static int uvc_ioctl_enum_framesizes(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvc_ioctl_enum_frameintervals(struct file *file, void *fh,
|
||||
static int uvc_ioctl_enum_frameintervals(struct file *file, void *priv,
|
||||
struct v4l2_frmivalenum *fival)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
@ -1060,7 +1060,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh,
|
|||
}
|
||||
}
|
||||
|
||||
static long uvc_ioctl_default(struct file *file, void *fh, bool valid_prio,
|
||||
static long uvc_ioctl_default(struct file *file, void *priv, bool valid_prio,
|
||||
unsigned int cmd, void *arg)
|
||||
{
|
||||
struct uvc_fh *handle = to_uvc_fh(file);
|
||||
|
|
|
|||
Loading…
Reference in New Issue