]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/easycap: kill EASYCAP_NEEDS_UNLOCKED_IOCTL
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 3 Feb 2011 11:42:39 +0000 (13:42 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 20:44:31 +0000 (12:44 -0800)
we can kill this option for in-kernel driver

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/Makefile
drivers/staging/easycap/easycap.h
drivers/staging/easycap/easycap_ioctl.c
drivers/staging/easycap/easycap_main.c
drivers/staging/easycap/easycap_sound_oss.c

index a01ca11ec1e4049d0374b0ee05eda5e4b9e37a45..987ccb184f57c302ef1593908023fd75be51e1bf 100644 (file)
@@ -12,5 +12,4 @@ ccflags-y := -Wall
 ccflags-y += -DEASYCAP_IS_VIDEODEV_CLIENT
 ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H
 ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS
-ccflags-y += -DEASYCAP_NEEDS_UNLOCKED_IOCTL
 
index 589f0387e75f5e80d813693a92755865e0a94478..47467d5fdd2c017da545ce214320812a156a7b46 100644 (file)
@@ -33,7 +33,6 @@
  *                EASYCAP_NEEDS_USBVIDEO_H
  *                EASYCAP_NEEDS_V4L2_DEVICE_H
  *                EASYCAP_NEEDS_V4L2_FOPS
- *                EASYCAP_NEEDS_UNLOCKED_IOCTL
  *                EASYCAP_SILENT
  *
  *  IF REQUIRED THEY MUST BE EXTERNALLY DEFINED, FOR EXAMPLE AS COMPILER
@@ -511,9 +510,7 @@ __s16 oldaudio;
  *  VIDEO FUNCTION PROTOTYPES
  */
 /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
-long easycap_ioctl_noinode(struct file *, unsigned int, unsigned long);
-int easycap_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
-
+long easycap_unlocked_ioctl(struct file *, unsigned int, unsigned long);
 int              easycap_dqbuf(struct easycap *, int);
 int              submit_video_urbs(struct easycap *);
 int              kill_video_urbs(struct easycap *);
index 9671ff193acdf58abd58942946719d84ba81cdae..ee581c4f8037f1e028bf4ba97447e5593d756c0e 100644 (file)
@@ -949,20 +949,9 @@ while (0xFFFFFFFF != easycap_control[i1].id) {
 SAM("WARNING: failed to adjust mute: control not found\n");
 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
-easycap_ioctl(struct inode *inode, struct file *file,
-                                       unsigned int cmd, unsigned long arg)
+long easycap_unlocked_ioctl(struct file *file,
+                           unsigned int cmd, unsigned long arg)
 {
 struct easycap *peasycap;
 struct usb_device *p;
index 4944fcb6d1d68a67603b482c21c9d37b0969f0c1..dce9bd6e47ef3f13399c1f160d52406e56aa5db8 100644 (file)
@@ -3117,11 +3117,7 @@ static const struct file_operations easycap_fops = {
        .owner          = THIS_MODULE,
        .open           = easycap_open,
        .release        = easycap_release,
-#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL)
-       .unlocked_ioctl = easycap_ioctl_noinode,
-#else
-       .ioctl          = easycap_ioctl,
-#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
+       .unlocked_ioctl = easycap_unlocked_ioctl,
        .poll           = easycap_poll,
        .mmap           = easycap_mmap,
        .llseek         = no_llseek,
@@ -3138,11 +3134,7 @@ static const struct v4l2_file_operations v4l2_fops = {
        .owner          = THIS_MODULE,
        .open           = easycap_open_noinode,
        .release        = easycap_release_noinode,
-#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL)
-       .unlocked_ioctl = easycap_ioctl_noinode,
-#else
-       .ioctl          = easycap_ioctl,
-#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
+       .unlocked_ioctl = easycap_unlocked_ioctl,
        .poll           = easycap_poll,
        .mmap           = easycap_mmap,
 };
index d40d1a02a2b957819756e39216844f39446ce099..7c98261bbf228152205f72ff3b60b2b016f36c65 100644 (file)
@@ -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)
 {
 struct easycap *peasycap;
@@ -1000,26 +1000,13 @@ default: {
 mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
 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 = {
        .owner          = THIS_MODULE,
        .open           = easyoss_open,
        .release        = easyoss_release,
-#if defined(EASYCAP_NEEDS_UNLOCKED_IOCTL)
-       .unlocked_ioctl = easyoss_ioctl_noinode,
-#else
-       .ioctl          = easyoss_ioctl,
-#endif /*EASYCAP_NEEDS_UNLOCKED_IOCTL*/
+       .unlocked_ioctl = easyoss_unlocked_ioctl,
        .read           = easyoss_read,
        .llseek         = no_llseek,
 };