Commit f2b3c685 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/easycap: kill EASYCAP_NEEDS_UNLOCKED_IOCTL

we can kill this option for in-kernel driver
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9306b1bb
...@@ -12,5 +12,4 @@ ccflags-y := -Wall ...@@ -12,5 +12,4 @@ ccflags-y := -Wall
ccflags-y += -DEASYCAP_IS_VIDEODEV_CLIENT ccflags-y += -DEASYCAP_IS_VIDEODEV_CLIENT
ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H
ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS
ccflags-y += -DEASYCAP_NEEDS_UNLOCKED_IOCTL
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
* EASYCAP_NEEDS_USBVIDEO_H * EASYCAP_NEEDS_USBVIDEO_H
* EASYCAP_NEEDS_V4L2_DEVICE_H * EASYCAP_NEEDS_V4L2_DEVICE_H
* EASYCAP_NEEDS_V4L2_FOPS * EASYCAP_NEEDS_V4L2_FOPS
* EASYCAP_NEEDS_UNLOCKED_IOCTL
* EASYCAP_SILENT * EASYCAP_SILENT
* *
* IF REQUIRED THEY MUST BE EXTERNALLY DEFINED, FOR EXAMPLE AS COMPILER * IF REQUIRED THEY MUST BE EXTERNALLY DEFINED, FOR EXAMPLE AS COMPILER
...@@ -511,9 +510,7 @@ __s16 oldaudio; ...@@ -511,9 +510,7 @@ __s16 oldaudio;
* VIDEO FUNCTION PROTOTYPES * VIDEO FUNCTION PROTOTYPES
*/ */
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
long easycap_ioctl_noinode(struct file *, unsigned int, unsigned long); long easycap_unlocked_ioctl(struct file *, unsigned int, unsigned long);
int easycap_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
int easycap_dqbuf(struct easycap *, int); int easycap_dqbuf(struct easycap *, int);
int submit_video_urbs(struct easycap *); int submit_video_urbs(struct easycap *);
int kill_video_urbs(struct easycap *); int kill_video_urbs(struct easycap *);
......
...@@ -949,20 +949,9 @@ while (0xFFFFFFFF != easycap_control[i1].id) { ...@@ -949,20 +949,9 @@ while (0xFFFFFFFF != easycap_control[i1].id) {
SAM("WARNING: failed to adjust mute: control not found\n"); SAM("WARNING: failed to adjust mute: control not found\n");
return -ENOENT; return -ENOENT;
} }
/*****************************************************************************/
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if ((defined(EASYCAP_IS_VIDEODEV_CLIENT)) || \
(defined(EASYCAP_NEEDS_UNLOCKED_IOCTL)))
long
easycap_ioctl_noinode(struct file *file, unsigned int cmd, unsigned long arg) {
return (long)easycap_ioctl(NULL, file, cmd, arg);
}
#endif /*EASYCAP_IS_VIDEODEV_CLIENT||EASYCAP_NEEDS_UNLOCKED_IOCTL*/
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int long easycap_unlocked_ioctl(struct file *file,
easycap_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{ {
struct easycap *peasycap; struct easycap *peasycap;
struct usb_device *p; struct usb_device *p;
......
...@@ -3117,11 +3117,7 @@ static const struct file_operations easycap_fops = { ...@@ -3117,11 +3117,7 @@ static const struct file_operations easycap_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = easycap_open, .open = easycap_open,
.release = easycap_release, .release = easycap_release,
#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL) .unlocked_ioctl = easycap_unlocked_ioctl,
.unlocked_ioctl = easycap_ioctl_noinode,
#else
.ioctl = easycap_ioctl,
#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
.poll = easycap_poll, .poll = easycap_poll,
.mmap = easycap_mmap, .mmap = easycap_mmap,
.llseek = no_llseek, .llseek = no_llseek,
...@@ -3138,11 +3134,7 @@ static const struct v4l2_file_operations v4l2_fops = { ...@@ -3138,11 +3134,7 @@ static const struct v4l2_file_operations v4l2_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = easycap_open_noinode, .open = easycap_open_noinode,
.release = easycap_release_noinode, .release = easycap_release_noinode,
#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL) .unlocked_ioctl = easycap_unlocked_ioctl,
.unlocked_ioctl = easycap_ioctl_noinode,
#else
.ioctl = easycap_ioctl,
#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
.poll = easycap_poll, .poll = easycap_poll,
.mmap = easycap_mmap, .mmap = easycap_mmap,
}; };
......
...@@ -708,7 +708,7 @@ return szret; ...@@ -708,7 +708,7 @@ return szret;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int easyoss_ioctl(struct inode *inode, struct file *file, static long easyoss_unlocked_ioctl(struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct easycap *peasycap; struct easycap *peasycap;
...@@ -1000,26 +1000,13 @@ default: { ...@@ -1000,26 +1000,13 @@ default: {
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio); mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return 0; return 0;
} }
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if ((defined(EASYCAP_IS_VIDEODEV_CLIENT)) || \
(defined(EASYCAP_NEEDS_UNLOCKED_IOCTL)))
static long easyoss_ioctl_noinode(struct file *file,
unsigned int cmd, unsigned long arg)
{
return (long)easyoss_ioctl(NULL, file, cmd, arg);
}
#endif /*EASYCAP_IS_VIDEODEV_CLIENT||EASYCAP_NEEDS_UNLOCKED_IOCTL*/
/*****************************************************************************/ /*****************************************************************************/
const struct file_operations easyoss_fops = { const struct file_operations easyoss_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = easyoss_open, .open = easyoss_open,
.release = easyoss_release, .release = easyoss_release,
#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL) .unlocked_ioctl = easyoss_unlocked_ioctl,
.unlocked_ioctl = easyoss_ioctl_noinode,
#else
.ioctl = easyoss_ioctl,
#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
.read = easyoss_read, .read = easyoss_read,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
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