Use __module_get(THIS_MODULE) instead of try_module_get(THIS_MODULE) as we
authorIan Abbott <abbotti@mev.co.uk>
Fri, 18 Apr 2008 13:47:38 +0000 (13:47 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 18 Apr 2008 13:47:38 +0000 (13:47 +0000)
know our own module is active.

comedi/comedi_fops.c

index 0046540548b917bdd70509d5b56135ee56de082c..2e6f5885eb6f1eeaaee639002fc4aee7891e75a1 100644 (file)
@@ -1778,10 +1778,7 @@ static int comedi_open(struct inode *inode, struct file *file)
                return -ENODEV;
        }
       ok:
-       if (!try_module_get(THIS_MODULE)) {
-               mutex_unlock(&dev->mutex);
-               return -ENOSYS;
-       }
+       __module_get(THIS_MODULE);
 
        if (dev->attached) {
                if (!try_module_get(dev->driver->module)) {