]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedi_fops: remove disabled subdevice lock/unlock callback
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 21 Jul 2014 18:01:26 +0000 (11:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jul 2014 22:33:23 +0000 (15:33 -0700)
According to Ian Abbott, this code was added in comedi-0.7.6 back in June 1999
and has always been disabled.

The 'lock_f' and 'unlock' members don't even exist in the comedi_subdevice.
Just remove the disabled code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c

index 01fb31d7f3cdfdea5ffe3f8271c604785229843a..84a1e429f24c0a177d054c807ffcf9d31baae6c2 100644 (file)
@@ -1660,14 +1660,6 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg,
                s->lock = file;
        spin_unlock_irqrestore(&s->spin_lock, flags);
 
-#if 0
-       if (ret < 0)
-               return ret;
-
-       if (s->lock_f)
-               ret = s->lock_f(dev, s);
-#endif
-
        return ret;
 }
 
@@ -1702,14 +1694,8 @@ static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg,
        if (s->lock && s->lock != file)
                return -EACCES;
 
-       if (s->lock == file) {
-#if 0
-               if (s->unlock)
-                       s->unlock(dev, s);
-#endif
-
+       if (s->lock == file)
                s->lock = NULL;
-       }
 
        return 0;
 }