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

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
...@@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file) ...@@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
* copying is done already, arg is a kernel pointer. * 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_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -1215,12 +1215,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int ...@@ -1215,12 +1215,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
} }
#endif #endif
default: default:
return v4l_compat_translate_ioctl(inode,file,cmd,arg, return v4l_compat_translate_ioctl(file, cmd, arg,
saa7146_video_do_ioctl); __saa7146_video_do_ioctl);
} }
return 0; 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 */ /* buffer handling functions */
......
...@@ -168,7 +168,7 @@ static const char *get_v4l_name(int v4l_type) ...@@ -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. * 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) unsigned int cmd, void *arg)
{ {
struct pvr2_v4l2_fh *fh = file->private_data; struct pvr2_v4l2_fh *fh = file->private_data;
...@@ -863,8 +863,8 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ...@@ -863,8 +863,8 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
#endif #endif
default : default :
ret = v4l_compat_translate_ioctl(inode,file,cmd, ret = v4l_compat_translate_ioctl(file, cmd,
arg,pvr2_v4l2_do_ioctl); arg, __pvr2_v4l2_do_ioctl);
} }
pvr2_hdw_commit_ctl(hdw); pvr2_hdw_commit_ctl(hdw);
...@@ -890,6 +890,11 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ...@@ -890,6 +890,11 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
return ret; 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) static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
{ {
......
...@@ -464,7 +464,7 @@ static int uvc_v4l2_release(struct inode *inode, struct file *file) ...@@ -464,7 +464,7 @@ static int uvc_v4l2_release(struct inode *inode, struct file *file)
return 0; 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) unsigned int cmd, void *arg)
{ {
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
...@@ -978,8 +978,8 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *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); return uvc_xu_ctrl_query(video, arg, 1);
default: default:
if ((ret = v4l_compat_translate_ioctl(inode, file, cmd, arg, 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", uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n",
cmd); cmd);
return ret; return ret;
...@@ -988,6 +988,12 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file, ...@@ -988,6 +988,12 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
return ret; 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, static int uvc_v4l2_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
......
This diff is collapsed.
...@@ -625,7 +625,7 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type) ...@@ -625,7 +625,7 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type)
return -EINVAL; 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) unsigned int cmd, void *arg)
{ {
struct video_device *vfd = video_devdata(file); struct video_device *vfd = video_devdata(file);
...@@ -675,7 +675,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -675,7 +675,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
V4L2 ioctls. V4L2 ioctls.
********************************************************/ ********************************************************/
if (_IOC_TYPE(cmd) == 'v' && _IOC_NR(cmd) < BASE_VIDIOCPRIVATE) 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); __video_do_ioctl);
#endif #endif
...@@ -1832,7 +1832,7 @@ int video_ioctl2(struct inode *inode, struct file *file, ...@@ -1832,7 +1832,7 @@ int video_ioctl2(struct inode *inode, struct file *file,
} }
/* Handles IOCTL */ /* Handles IOCTL */
err = __video_do_ioctl(inode, file, cmd, parg); err = __video_do_ioctl(file, cmd, parg);
if (err == -ENOIOCTLCMD) if (err == -ENOIOCTLCMD)
err = -EINVAL; err = -EINVAL;
if (is_ext_ctrl) { if (is_ext_ctrl) {
......
...@@ -271,13 +271,13 @@ extern const char *v4l2_field_names[]; ...@@ -271,13 +271,13 @@ extern const char *v4l2_field_names[];
extern const char *v4l2_type_names[]; extern const char *v4l2_type_names[];
/* Compatibility layer interface -- v4l1-compat module */ /* Compatibility layer interface -- v4l1-compat module */
typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, typedef int (*v4l2_kioctl)(struct file *file,
unsigned int cmd, void *arg); unsigned int cmd, void *arg);
#ifdef CONFIG_VIDEO_V4L1_COMPAT #ifdef CONFIG_VIDEO_V4L1_COMPAT
int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, int v4l_compat_translate_ioctl(struct file *file,
int cmd, void *arg, v4l2_kioctl driver_ioctl); int cmd, void *arg, v4l2_kioctl driver_ioctl);
#else #else
#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL)
#endif #endif
/* 32 Bits compatibility layer for 64 bits processors */ /* 32 Bits compatibility layer for 64 bits processors */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment