V4L/DVB (9503): v4l: remove inode argument from video_usercopy
The inode argument was never used. Removing it from video_usercopy brings the function pointer type of video_usercopy in line with similar v4l2 functions, thus simplifying several drivers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Родитель
bef216b7ed
Коммит
f473bf76c7
|
@ -313,7 +313,7 @@ static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
|||
/*
|
||||
DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg));
|
||||
*/
|
||||
return video_usercopy(inode, file, cmd, arg, saa7146_video_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl);
|
||||
}
|
||||
|
||||
static int fops_mmap(struct file *file, struct vm_area_struct * vma)
|
||||
|
|
|
@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
|
|||
* copying is done already, arg is a kernel pointer.
|
||||
*/
|
||||
|
||||
static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct saa7146_fh *fh = file->private_data;
|
||||
struct saa7146_dev *dev = fh->dev;
|
||||
|
@ -1216,17 +1216,11 @@ static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *a
|
|||
#endif
|
||||
default:
|
||||
return v4l_compat_translate_ioctl(file, cmd, arg,
|
||||
__saa7146_video_do_ioctl);
|
||||
saa7146_video_do_ioctl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int saa7146_video_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
{
|
||||
return __saa7146_video_do_ioctl(file, cmd, arg);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
/* buffer handling functions */
|
||||
|
||||
|
|
|
@ -396,8 +396,7 @@ out_up:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ar_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *dev = video_devdata(file);
|
||||
struct ar_device *ar = video_get_drvdata(dev);
|
||||
|
@ -543,7 +542,7 @@ static int ar_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int ar_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, ar_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, ar_do_ioctl);
|
||||
}
|
||||
|
||||
#if USE_INT
|
||||
|
|
|
@ -706,8 +706,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
|
|||
* Video4linux interfacing
|
||||
*/
|
||||
|
||||
static int qcam_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *dev = video_devdata(file);
|
||||
struct qcam_device *qcam=(struct qcam_device *)dev;
|
||||
|
@ -867,7 +866,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int qcam_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, qcam_do_ioctl);
|
||||
}
|
||||
|
||||
static ssize_t qcam_read(struct file *file, char __user *buf,
|
||||
|
|
|
@ -500,8 +500,7 @@ static long qc_capture(struct qcam_device *q, char __user *buf, unsigned long le
|
|||
* Video4linux interfacing
|
||||
*/
|
||||
|
||||
static int qcam_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *dev = video_devdata(file);
|
||||
struct qcam_device *qcam=(struct qcam_device *)dev;
|
||||
|
@ -669,7 +668,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int qcam_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, qcam_do_ioctl);
|
||||
}
|
||||
|
||||
static ssize_t qcam_read(struct file *file, char __user *buf,
|
||||
|
|
|
@ -3333,8 +3333,7 @@ static ssize_t cpia_read(struct file *file, char __user *buf,
|
|||
return cam->decompressed_frame.count;
|
||||
}
|
||||
|
||||
static int cpia_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int ioctlnr, void *arg)
|
||||
static int cpia_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *dev = file->private_data;
|
||||
struct cam_data *cam = video_get_drvdata(dev);
|
||||
|
@ -3347,9 +3346,9 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file,
|
|||
if (mutex_lock_interruptible(&cam->busy_lock))
|
||||
return -EINTR;
|
||||
|
||||
//DBG("cpia_ioctl: %u\n", ioctlnr);
|
||||
/* DBG("cpia_ioctl: %u\n", cmd); */
|
||||
|
||||
switch (ioctlnr) {
|
||||
switch (cmd) {
|
||||
/* query capabilities */
|
||||
case VIDIOCGCAP:
|
||||
{
|
||||
|
@ -3724,7 +3723,7 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int cpia_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, cpia_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, cpia_do_ioctl);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1572,8 +1572,7 @@ static int ioctl_dqbuf(void *arg,struct camera_data *cam, struct file *file)
|
|||
* cpia2_ioctl
|
||||
*
|
||||
*****************************************************************************/
|
||||
static int cpia2_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int ioctl_nr, void *arg)
|
||||
static int cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct camera_data *cam = video_drvdata(file);
|
||||
int retval = 0;
|
||||
|
@ -1591,7 +1590,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file,
|
|||
}
|
||||
|
||||
/* Priority check */
|
||||
switch (ioctl_nr) {
|
||||
switch (cmd) {
|
||||
case VIDIOCSWIN:
|
||||
case VIDIOCMCAPTURE:
|
||||
case VIDIOC_S_FMT:
|
||||
|
@ -1618,7 +1617,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file,
|
|||
break;
|
||||
}
|
||||
|
||||
switch (ioctl_nr) {
|
||||
switch (cmd) {
|
||||
case VIDIOCGCAP: /* query capabilities */
|
||||
retval = ioctl_cap_query(arg, cam);
|
||||
break;
|
||||
|
@ -1683,7 +1682,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file,
|
|||
case VIDIOC_ENUMINPUT:
|
||||
case VIDIOC_G_INPUT:
|
||||
case VIDIOC_S_INPUT:
|
||||
retval = ioctl_input(ioctl_nr, arg,cam);
|
||||
retval = ioctl_input(cmd, arg, cam);
|
||||
break;
|
||||
|
||||
case VIDIOC_ENUM_FMT:
|
||||
|
@ -1843,9 +1842,9 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file,
|
|||
}
|
||||
|
||||
static int cpia2_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int ioctl_nr, unsigned long iarg)
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, ioctl_nr, iarg, cpia2_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, cpia2_do_ioctl);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -4011,8 +4011,7 @@ ov51x_v4l1_close(struct inode *inode, struct file *file)
|
|||
|
||||
/* Do not call this function directly! */
|
||||
static int
|
||||
ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
ov51x_v4l1_ioctl_internal(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *vdev = file->private_data;
|
||||
struct usb_ov511 *ov = video_get_drvdata(vdev);
|
||||
|
@ -4461,7 +4460,7 @@ ov51x_v4l1_ioctl(struct inode *inode, struct file *file,
|
|||
if (mutex_lock_interruptible(&ov->lock))
|
||||
return -EINTR;
|
||||
|
||||
rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal);
|
||||
rc = video_usercopy(file, cmd, arg, ov51x_v4l1_ioctl_internal);
|
||||
|
||||
mutex_unlock(&ov->lock);
|
||||
return rc;
|
||||
|
|
|
@ -680,8 +680,7 @@ static int pms_capture(struct pms_device *dev, char __user *buf, int rgb555, int
|
|||
* Video4linux interfacing
|
||||
*/
|
||||
|
||||
static int pms_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int pms_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *dev = video_devdata(file);
|
||||
struct pms_device *pd=(struct pms_device *)dev;
|
||||
|
@ -866,7 +865,7 @@ static int pms_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int pms_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, pms_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, pms_do_ioctl);
|
||||
}
|
||||
|
||||
static ssize_t pms_read(struct file *file, char __user *buf,
|
||||
|
|
|
@ -168,8 +168,7 @@ static const char *get_v4l_name(int v4l_type)
|
|||
* This is part of Video 4 Linux API. The procedure handles ioctl() calls.
|
||||
*
|
||||
*/
|
||||
static int __pvr2_v4l2_do_ioctl(struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct pvr2_v4l2_fh *fh = file->private_data;
|
||||
struct pvr2_v4l2 *vp = fh->vhead;
|
||||
|
@ -864,7 +863,7 @@ static int __pvr2_v4l2_do_ioctl(struct file *file,
|
|||
|
||||
default :
|
||||
ret = v4l_compat_translate_ioctl(file, cmd,
|
||||
arg, __pvr2_v4l2_do_ioctl);
|
||||
arg, pvr2_v4l2_do_ioctl);
|
||||
}
|
||||
|
||||
pvr2_hdw_commit_ctl(hdw);
|
||||
|
@ -890,12 +889,6 @@ static int __pvr2_v4l2_do_ioctl(struct file *file,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
{
|
||||
return __pvr2_v4l2_do_ioctl(file, cmd, arg);
|
||||
}
|
||||
|
||||
static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
|
||||
{
|
||||
int num = dip->devbase.num;
|
||||
|
@ -963,7 +956,7 @@ static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file,
|
|||
#define IVTV_IOC_G_CODEC 0xFFEE7703
|
||||
#define IVTV_IOC_S_CODEC 0xFFEE7704
|
||||
if (cmd == IVTV_IOC_G_CODEC || cmd == IVTV_IOC_S_CODEC) return 0;
|
||||
return video_usercopy(inode, file, cmd, arg, pvr2_v4l2_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, pvr2_v4l2_do_ioctl);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1412,7 +1412,7 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file,
|
|||
|
||||
mutex_lock(&pdev->modlock);
|
||||
if (!pdev->unplugged)
|
||||
r = video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl);
|
||||
r = video_usercopy(file, cmd, arg, pwc_video_do_ioctl);
|
||||
mutex_unlock(&pdev->modlock);
|
||||
out:
|
||||
return r;
|
||||
|
|
|
@ -337,8 +337,7 @@ static int pwc_vidioc_set_fmt(struct pwc_device *pdev, struct v4l2_format *f)
|
|||
|
||||
}
|
||||
|
||||
int pwc_video_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
int pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *vdev = video_devdata(file);
|
||||
struct pwc_device *pdev;
|
||||
|
|
|
@ -340,8 +340,7 @@ extern int pwc_camera_power(struct pwc_device *pdev, int power);
|
|||
extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg);
|
||||
|
||||
/** Functions in pwc-v4l.c */
|
||||
extern int pwc_video_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg);
|
||||
extern int pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg);
|
||||
|
||||
/** pwc-uncompress.c */
|
||||
/* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */
|
||||
|
|
|
@ -804,8 +804,7 @@ static inline int saa5246a_stop_dau(struct saa5246a_device *t,
|
|||
*
|
||||
* Returns 0 if successful
|
||||
*/
|
||||
static int do_saa5246a_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int do_saa5246a_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct saa5246a_device *t = video_drvdata(file);
|
||||
|
||||
|
@ -953,7 +952,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file,
|
|||
|
||||
cmd = vtx_fix_command(cmd);
|
||||
mutex_lock(&t->lock);
|
||||
err = video_usercopy(inode, file, cmd, arg, do_saa5246a_ioctl);
|
||||
err = video_usercopy(file, cmd, arg, do_saa5246a_ioctl);
|
||||
mutex_unlock(&t->lock);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -190,8 +190,7 @@ static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf)
|
|||
* Standard character-device-driver functions
|
||||
*/
|
||||
|
||||
static int do_saa5249_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int do_saa5249_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
static int virtual_mode = false;
|
||||
struct saa5249_device *t = video_drvdata(file);
|
||||
|
@ -488,7 +487,7 @@ static int saa5249_ioctl(struct inode *inode, struct file *file,
|
|||
|
||||
cmd = vtx_fix_command(cmd);
|
||||
mutex_lock(&t->lock);
|
||||
err = video_usercopy(inode,file,cmd,arg,do_saa5249_ioctl);
|
||||
err = video_usercopy(file, cmd, arg, do_saa5249_ioctl);
|
||||
mutex_unlock(&t->lock);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -975,8 +975,7 @@ static int se401_close(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int se401_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int se401_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *vdev = file->private_data;
|
||||
struct usb_se401 *se401 = (struct usb_se401 *)vdev;
|
||||
|
@ -1142,7 +1141,7 @@ static int se401_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int se401_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, se401_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, se401_do_ioctl);
|
||||
}
|
||||
|
||||
static ssize_t se401_read(struct file *file, char __user *buf,
|
||||
|
|
|
@ -1132,8 +1132,7 @@ static int stv_close (struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int stv680_do_ioctl (struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int stv680_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *vdev = file->private_data;
|
||||
struct usb_stv *stv680 = video_get_drvdata(vdev);
|
||||
|
@ -1303,7 +1302,7 @@ static int stv680_do_ioctl (struct inode *inode, struct file *file,
|
|||
static int stv680_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, stv680_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, stv680_do_ioctl);
|
||||
}
|
||||
|
||||
static int stv680_mmap (struct file *file, struct vm_area_struct *vma)
|
||||
|
|
|
@ -1281,8 +1281,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file)
|
|||
* History:
|
||||
* 22-Jan-2000 Corrected VIDIOCSPICT to reject unsupported settings.
|
||||
*/
|
||||
static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int usbvideo_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct uvd *uvd = file->private_data;
|
||||
|
||||
|
@ -1505,7 +1504,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, usbvideo_v4l_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, usbvideo_v4l_do_ioctl);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1278,7 +1278,7 @@ static int usbvision_vbi_close(struct inode *inode, struct file *file)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int usbvision_do_vbi_ioctl(struct inode *inode, struct file *file,
|
||||
static int usbvision_do_vbi_ioctl(struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
{
|
||||
/* TODO */
|
||||
|
@ -1288,7 +1288,7 @@ static int usbvision_do_vbi_ioctl(struct inode *inode, struct file *file,
|
|||
static int usbvision_vbi_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, usbvision_do_vbi_ioctl);
|
||||
return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -464,8 +464,7 @@ static int uvc_v4l2_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __uvc_v4l2_do_ioctl(struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct video_device *vdev = video_devdata(file);
|
||||
struct uvc_video_device *video = video_get_drvdata(vdev);
|
||||
|
@ -979,7 +978,7 @@ static int __uvc_v4l2_do_ioctl(struct file *file,
|
|||
|
||||
default:
|
||||
if ((ret = v4l_compat_translate_ioctl(file, cmd, arg,
|
||||
__uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
|
||||
uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
|
||||
uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n",
|
||||
cmd);
|
||||
return ret;
|
||||
|
@ -988,17 +987,11 @@ static int __uvc_v4l2_do_ioctl(struct file *file,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
{
|
||||
return __uvc_v4l2_do_ioctl(file, cmd, arg);
|
||||
}
|
||||
|
||||
static int uvc_v4l2_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_ioctl\n");
|
||||
return video_usercopy(inode, file, cmd, arg, uvc_v4l2_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, uvc_v4l2_do_ioctl);
|
||||
}
|
||||
|
||||
static ssize_t uvc_v4l2_read(struct file *file, char __user *data,
|
||||
|
|
|
@ -393,10 +393,8 @@ video_fix_command(unsigned int cmd)
|
|||
* Obsolete usercopy function - Should be removed soon
|
||||
*/
|
||||
int
|
||||
video_usercopy(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg))
|
||||
video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
|
||||
v4l2_kioctl func)
|
||||
{
|
||||
char sbuf[128];
|
||||
void *mbuf = NULL;
|
||||
|
@ -458,7 +456,7 @@ video_usercopy(struct inode *inode, struct file *file,
|
|||
}
|
||||
|
||||
/* call driver */
|
||||
err = func(inode, file, cmd, parg);
|
||||
err = func(file, cmd, parg);
|
||||
if (err == -ENOIOCTLCMD)
|
||||
err = -EINVAL;
|
||||
if (is_ext_ctrl) {
|
||||
|
|
|
@ -4237,8 +4237,7 @@ error:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int vino_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int vino_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct vino_channel_settings *vcs = video_drvdata(file);
|
||||
|
||||
|
@ -4353,7 +4352,7 @@ static int vino_ioctl(struct inode *inode, struct file *file,
|
|||
if (mutex_lock_interruptible(&vcs->mutex))
|
||||
return -EINTR;
|
||||
|
||||
ret = video_usercopy(inode, file, cmd, arg, vino_do_ioctl);
|
||||
ret = video_usercopy(file, cmd, arg, vino_do_ioctl);
|
||||
|
||||
mutex_unlock(&vcs->mutex);
|
||||
|
||||
|
|
|
@ -727,8 +727,7 @@ static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data)
|
|||
* Video4linux interfacing
|
||||
*/
|
||||
|
||||
static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg)
|
||||
static int w9966_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct w9966_dev *cam = video_drvdata(file);
|
||||
|
||||
|
@ -881,7 +880,7 @@ static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
|
|||
static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, w9966_v4l_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl);
|
||||
}
|
||||
|
||||
// Capture data
|
||||
|
|
|
@ -1940,11 +1940,7 @@ zoran_set_input (struct zoran *zr,
|
|||
* ioctl routine
|
||||
*/
|
||||
|
||||
static int
|
||||
zoran_do_ioctl (struct inode *inode,
|
||||
struct file *file,
|
||||
unsigned int cmd,
|
||||
void *arg)
|
||||
static int zoran_do_ioctl(struct file *file, unsigned int cmd, void *arg)
|
||||
{
|
||||
struct zoran_fh *fh = file->private_data;
|
||||
struct zoran *zr = fh->zr;
|
||||
|
@ -4201,7 +4197,7 @@ zoran_ioctl (struct inode *inode,
|
|||
unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
return video_usercopy(inode, file, cmd, arg, zoran_do_ioctl);
|
||||
return video_usercopy(file, cmd, arg, zoran_do_ioctl);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
|
|
@ -216,8 +216,7 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data);
|
|||
extern struct saa7146_use_ops saa7146_video_uops;
|
||||
int saa7146_start_preview(struct saa7146_fh *fh);
|
||||
int saa7146_stop_preview(struct saa7146_fh *fh);
|
||||
int saa7146_video_do_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg);
|
||||
int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg);
|
||||
|
||||
/* from saa7146_vbi.c */
|
||||
extern struct saa7146_use_ops saa7146_vbi_uops;
|
||||
|
|
|
@ -285,10 +285,8 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
|
|||
unsigned long arg);
|
||||
|
||||
/* Include support for obsoleted stuff */
|
||||
extern int video_usercopy(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
int (*func)(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, void *arg));
|
||||
extern int video_usercopy(struct file *file, unsigned int cmd,
|
||||
unsigned long arg, v4l2_kioctl func);
|
||||
|
||||
/* Standard handlers for V4L ioctl's */
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче