Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1f88407 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()



The inode parameter at v4l_compat_translate_ioctl() were just passed over several
places just to keep compatible with fops.ioctl. However, it weren't used anywere.

This patch gets hid of this unused parameter.

Cc: Laurent Pinchart <laurent.pinchart@skynet.be>
Cc: Mike Isely <isely@pobox.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4e7ca40d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
 * copying is done already, arg is a kernel pointer.
 */

int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg)
static 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;
@@ -1215,12 +1215,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
	}
#endif
	default:
		return v4l_compat_translate_ioctl(inode,file,cmd,arg,
						  saa7146_video_do_ioctl);
		return v4l_compat_translate_ioctl(file, cmd, arg,
						  __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                                                  */

+8 −3
Original line number Diff line number Diff line
@@ -168,7 +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 inode *inode, struct file *file,
static int __pvr2_v4l2_do_ioctl(struct file *file,
			      unsigned int cmd, void *arg)
{
	struct pvr2_v4l2_fh *fh = file->private_data;
@@ -863,8 +863,8 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
#endif

	default :
		ret = v4l_compat_translate_ioctl(inode,file,cmd,
						 arg,pvr2_v4l2_do_ioctl);
		ret = v4l_compat_translate_ioctl(file, cmd,
						 arg, __pvr2_v4l2_do_ioctl);
	}

	pvr2_hdw_commit_ctl(hdw);
@@ -890,6 +890,11 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, 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)
{
+9 −3
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ static int uvc_v4l2_release(struct inode *inode, struct file *file)
	return 0;
}

static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
static int __uvc_v4l2_do_ioctl(struct file *file,
		     unsigned int cmd, void *arg)
{
	struct video_device *vdev = video_devdata(file);
@@ -978,8 +978,8 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
		return uvc_xu_ctrl_query(video, arg, 1);

	default:
		if ((ret = v4l_compat_translate_ioctl(inode, file, cmd, arg,
			uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
		if ((ret = v4l_compat_translate_ioctl(file, cmd, arg,
			__uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
			uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n",
				  cmd);
		return ret;
@@ -988,6 +988,12 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, 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)
{
+98 −123

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -625,7 +625,7 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type)
	return -EINVAL;
}

static int __video_do_ioctl(struct inode *inode, struct file *file,
static int __video_do_ioctl(struct file *file,
		unsigned int cmd, void *arg)
{
	struct video_device *vfd = video_devdata(file);
@@ -675,7 +675,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
	 V4L2 ioctls.
	 ********************************************************/
	if (_IOC_TYPE(cmd) == 'v' && _IOC_NR(cmd) < BASE_VIDIOCPRIVATE)
		return v4l_compat_translate_ioctl(inode, file, cmd, arg,
		return v4l_compat_translate_ioctl(file, cmd, arg,
						__video_do_ioctl);
#endif

@@ -1832,7 +1832,7 @@ int video_ioctl2(struct inode *inode, struct file *file,
	}

	/* Handles IOCTL */
	err = __video_do_ioctl(inode, file, cmd, parg);
	err = __video_do_ioctl(file, cmd, parg);
	if (err == -ENOIOCTLCMD)
		err = -EINVAL;
	if (is_ext_ctrl) {
Loading