aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-03-17 08:52:20 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2015-03-17 08:52:20 +0100
commit294f646cf45fae59a4524f31a081c830fe9aae1e (patch)
treecbaa959935b24886942477f20eff3eea9df80083
parente146bd1206a4b53d625f8559b424ec18b7f17f1c (diff)
v4l2-ioctl: drop 'fh' argument from vidioc_enum_frame*
That argument is rarely used and can always be obtained from file->private_data anyway, so drop it for vidioc_enum_frame*. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c4
-rw-r--r--drivers/media/platform/am437x/am437x-vpfe.c2
-rw-r--r--drivers/media/platform/marvell-ccic/mcam-core.c8
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c2
-rw-r--r--drivers/media/platform/timblogiw.c4
-rw-r--r--drivers/media/platform/via-camera.c4
-rw-r--r--drivers/media/platform/vivid/vivid-vid-cap.c4
-rw-r--r--drivers/media/platform/vivid/vivid-vid-cap.h4
-rw-r--r--drivers/media/usb/cpia2/cpia2_v4l.c4
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/usb/go7007/go7007-v4l2.c4
-rw-r--r--drivers/media/usb/gspca/gspca.c4
-rw-r--r--drivers/media/usb/pwc/pwc-v4l.c4
-rw-r--r--drivers/media/usb/s2255/s2255drv.c4
-rw-r--r--drivers/media/usb/stkwebcam/stk-webcam.c2
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c8
-rw-r--r--include/media/v4l2-ioctl.h4
17 files changed, 34 insertions, 34 deletions
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 53fff5425c13..62490cea1f78 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -975,7 +975,7 @@ static int solo_enc_s_std(struct file *file, void *priv, v4l2_std_id std)
return solo_set_video_type(solo_enc->solo_dev, std & V4L2_STD_625_50);
}
-static int solo_enum_framesizes(struct file *file, void *priv,
+static int solo_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct solo_enc_dev *solo_enc = video_drvdata(file);
@@ -1002,7 +1002,7 @@ static int solo_enum_framesizes(struct file *file, void *priv,
return 0;
}
-static int solo_enum_frameintervals(struct file *file, void *priv,
+static int solo_enum_frameintervals(struct file *file,
struct v4l2_frmivalenum *fintv)
{
struct solo_enc_dev *solo_enc = video_drvdata(file);
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 04f010f90651..bd9b36efea59 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -1605,7 +1605,7 @@ static int vpfe_s_fmt(struct file *file, void *priv,
return vpfe_config_ccdc_image_format(vpfe);
}
-static int vpfe_enum_size(struct file *file, void *priv,
+static int vpfe_enum_size(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct vpfe_device *vpfe = video_drvdata(file);
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index dd5b1415f974..e5dc96d3c410 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1564,10 +1564,10 @@ static int mcam_vidioc_s_parm(struct file *filp, void *priv,
return ret;
}
-static int mcam_vidioc_enum_framesizes(struct file *filp, void *priv,
+static int mcam_vidioc_enum_framesizes(struct file *filp,
struct v4l2_frmsizeenum *sizes)
{
- struct mcam_camera *cam = priv;
+ struct mcam_camera *cam = filp->private_data;
int ret;
mutex_lock(&cam->s_mutex);
@@ -1576,10 +1576,10 @@ static int mcam_vidioc_enum_framesizes(struct file *filp, void *priv,
return ret;
}
-static int mcam_vidioc_enum_frameintervals(struct file *filp, void *priv,
+static int mcam_vidioc_enum_frameintervals(struct file *filp,
struct v4l2_frmivalenum *interval)
{
- struct mcam_camera *cam = priv;
+ struct mcam_camera *cam = filp->private_data;
int ret;
mutex_lock(&cam->s_mutex);
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index cee7b56f8404..981b39f79666 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -326,7 +326,7 @@ static int soc_camera_g_std(struct file *file, void *priv, v4l2_std_id *a)
return v4l2_subdev_call(sd, video, g_std, a);
}
-static int soc_camera_enum_framesizes(struct file *file, void *fh,
+static int soc_camera_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct soc_camera_device *icd = file->private_data;
diff --git a/drivers/media/platform/timblogiw.c b/drivers/media/platform/timblogiw.c
index 5820e45b3a9f..511a48778dcc 100644
--- a/drivers/media/platform/timblogiw.c
+++ b/drivers/media/platform/timblogiw.c
@@ -449,11 +449,11 @@ static int timblogiw_querystd(struct file *file, void *priv, v4l2_std_id *std)
}
}
-static int timblogiw_enum_framesizes(struct file *file, void *priv,
+static int timblogiw_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct video_device *vdev = video_devdata(file);
- struct timblogiw_fh *fh = priv;
+ struct timblogiw_fh *fh = file->private_data;
dev_dbg(&vdev->dev, "%s - index: %d, format: %d\n", __func__,
fsize->index, fsize->pixel_format);
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index 86989d86abfa..986a27bf06e3 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -1129,7 +1129,7 @@ static int viacam_s_parm(struct file *filp, void *priv,
return ret;
}
-static int viacam_enum_framesizes(struct file *filp, void *priv,
+static int viacam_enum_framesizes(struct file *filp,
struct v4l2_frmsizeenum *sizes)
{
if (sizes->index != 0)
@@ -1143,7 +1143,7 @@ static int viacam_enum_framesizes(struct file *filp, void *priv,
return 0;
}
-static int viacam_enum_frameintervals(struct file *filp, void *priv,
+static int viacam_enum_frameintervals(struct file *filp,
struct v4l2_frmivalenum *interval)
{
struct via_camera *cam = priv;
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 10aee9911f5c..4c9c95ef7ed0 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -1621,7 +1621,7 @@ int vidioc_s_edid(struct file *file, struct v4l2_edid *edid)
return 0;
}
-int vidioc_enum_framesizes(struct file *file, void *fh,
+int vidioc_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct vivid_dev *dev = video_drvdata(file);
@@ -1650,7 +1650,7 @@ int vidioc_enum_framesizes(struct file *file, void *fh,
}
/* timeperframe is arbitrary and continuous */
-int vidioc_enum_frameintervals(struct file *file, void *priv,
+int vidioc_enum_frameintervals(struct file *file,
struct v4l2_frmivalenum *fival)
{
struct vivid_dev *dev = video_drvdata(file);
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.h b/drivers/media/platform/vivid/vivid-vid-cap.h
index 83f083dbc2b5..91ecb29f2406 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.h
+++ b/drivers/media/platform/vivid/vivid-vid-cap.h
@@ -63,8 +63,8 @@ int vivid_vid_cap_s_std(struct file *file, void *priv, v4l2_std_id id);
int vivid_vid_cap_s_dv_timings(struct file *file, struct v4l2_dv_timings *timings);
int vidioc_query_dv_timings(struct file *file, struct v4l2_dv_timings *timings);
int vidioc_s_edid(struct file *file, struct v4l2_edid *edid);
-int vidioc_enum_framesizes(struct file *file, void *fh, struct v4l2_frmsizeenum *fsize);
-int vidioc_enum_frameintervals(struct file *file, void *priv, struct v4l2_frmivalenum *fival);
+int vidioc_enum_framesizes(struct file *file, struct v4l2_frmsizeenum *fsize);
+int vidioc_enum_frameintervals(struct file *file, struct v4l2_frmivalenum *fival);
int vivid_vid_cap_g_parm(struct file *file, void *priv, struct v4l2_streamparm *parm);
int vivid_vid_cap_s_parm(struct file *file, void *priv, struct v4l2_streamparm *parm);
diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c
index 9caea8344547..798a66d104c4 100644
--- a/drivers/media/usb/cpia2/cpia2_v4l.c
+++ b/drivers/media/usb/cpia2/cpia2_v4l.c
@@ -583,7 +583,7 @@ static const struct {
{ 176, 144 },
};
-static int cpia2_enum_framesizes(struct file *file, void *fh,
+static int cpia2_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
@@ -599,7 +599,7 @@ static int cpia2_enum_framesizes(struct file *file, void *fh,
return 0;
}
-static int cpia2_enum_frameintervals(struct file *file, void *fh,
+static int cpia2_enum_frameintervals(struct file *file,
struct v4l2_frmivalenum *fival)
{
struct camera_data *cam = video_drvdata(file);
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 9ecf65629b3d..0b46c4a86a93 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1749,7 +1749,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
return 0;
}
-static int vidioc_enum_framesizes(struct file *file, void *priv,
+static int vidioc_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct em28xx *dev = video_drvdata(file);
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c
index d6bf982efa42..6c110ceef307 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -534,7 +534,7 @@ static int vidioc_s_parm(struct file *filp, void *priv,
The two functions below implement the newer ioctls
*/
-static int vidioc_enum_framesizes(struct file *filp, void *priv,
+static int vidioc_enum_framesizes(struct file *filp,
struct v4l2_frmsizeenum *fsize)
{
struct go7007 *go = video_drvdata(filp);
@@ -553,7 +553,7 @@ static int vidioc_enum_framesizes(struct file *filp, void *priv,
return 0;
}
-static int vidioc_enum_frameintervals(struct file *filp, void *priv,
+static int vidioc_enum_frameintervals(struct file *filp,
struct v4l2_frmivalenum *fival)
{
struct go7007 *go = video_drvdata(filp);
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index e54cee856a80..3c8051b97799 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -1200,7 +1200,7 @@ out:
return ret;
}
-static int vidioc_enum_framesizes(struct file *file, void *priv,
+static int vidioc_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct gspca_dev *gspca_dev = video_drvdata(file);
@@ -1229,7 +1229,7 @@ static int vidioc_enum_framesizes(struct file *file, void *priv,
return -EINVAL;
}
-static int vidioc_enum_frameintervals(struct file *filp, void *priv,
+static int vidioc_enum_frameintervals(struct file *filp,
struct v4l2_frmivalenum *fival)
{
struct gspca_dev *gspca_dev = video_drvdata(filp);
diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
index 3d987984602f..ed255a00d413 100644
--- a/drivers/media/usb/pwc/pwc-v4l.c
+++ b/drivers/media/usb/pwc/pwc-v4l.c
@@ -922,7 +922,7 @@ static int pwc_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *
return pwc_vidioc_try_fmt(pdev, f);
}
-static int pwc_enum_framesizes(struct file *file, void *fh,
+static int pwc_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
struct pwc_device *pdev = video_drvdata(file);
@@ -947,7 +947,7 @@ static int pwc_enum_framesizes(struct file *file, void *fh,
return -EINVAL;
}
-static int pwc_enum_frameintervals(struct file *file, void *fh,
+static int pwc_enum_frameintervals(struct file *file,
struct v4l2_frmivalenum *fival)
{
struct pwc_device *pdev = video_drvdata(file);
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 0f3c34d47ec3..d40860352f5a 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1378,7 +1378,7 @@ static const struct v4l2_frmsize_discrete pal_sizes[] = {
{ 352, 288 },
};
-static int vidioc_enum_framesizes(struct file *file, void *priv,
+static int vidioc_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fe)
{
struct s2255_vc *vc = video_drvdata(file);
@@ -1396,7 +1396,7 @@ static int vidioc_enum_framesizes(struct file *file, void *priv,
return 0;
}
-static int vidioc_enum_frameintervals(struct file *file, void *priv,
+static int vidioc_enum_frameintervals(struct file *file,
struct v4l2_frmivalenum *fe)
{
struct s2255_vc *vc = video_drvdata(file);
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index c21c4c004f97..c27294636d05 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -1182,7 +1182,7 @@ static int stk_vidioc_g_parm(struct file *filp,
}
static int stk_vidioc_enum_framesizes(struct file *filp,
- void *priv, struct v4l2_frmsizeenum *frms)
+ struct v4l2_frmsizeenum *frms)
{
if (frms->index >= ARRAY_SIZE(stk_sizes))
return -EINVAL;
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 9880d9ed20b7..545866a2b0b6 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -1064,10 +1064,10 @@ static int uvc_ioctl_s_parm(struct file *file, void *fh,
return uvc_v4l2_set_streamparm(stream, parm);
}
-static int uvc_ioctl_enum_framesizes(struct file *file, void *fh,
+static int uvc_ioctl_enum_framesizes(struct file *file,
struct v4l2_frmsizeenum *fsize)
{
- struct uvc_fh *handle = fh;
+ struct uvc_fh *handle = file->private_data;
struct uvc_streaming *stream = handle->stream;
struct uvc_format *format = NULL;
struct uvc_frame *frame;
@@ -1093,10 +1093,10 @@ 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,
struct v4l2_frmivalenum *fival)
{
- struct uvc_fh *handle = fh;
+ struct uvc_fh *handle = file->private_data;
struct uvc_streaming *stream = handle->stream;
struct uvc_format *format = NULL;
struct uvc_frame *frame = NULL;
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 8bb4d4af92c8..95261e6601d1 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -252,10 +252,10 @@ struct v4l2_ioctl_ops {
struct v4l2_dbg_chip_info *chip);
#endif
- int (*vidioc_enum_framesizes) (struct file *file, void *fh,
+ int (*vidioc_enum_framesizes) (struct file *file,
struct v4l2_frmsizeenum *fsize);
- int (*vidioc_enum_frameintervals) (struct file *file, void *fh,
+ int (*vidioc_enum_frameintervals) (struct file *file,
struct v4l2_frmivalenum *fival);
/* DV Timings IOCTLs */

Privacy Policy