]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: comedi: make class and file operations static
authorIan Abbott <abbotti@mev.co.uk>
Tue, 19 Jun 2012 09:17:43 +0000 (10:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 19:56:54 +0000 (12:56 -0700)
A couple of global variables in "comedi_fops.c" are only referenced from
that .c file and can be declared 'static'.  Also remove them from
"comedi_fops.h" where they are declared 'extern'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedi_fops.h

index ad86347341943dfd0739a363aa10f26ea83565dc..3650753b62f7fbd19d58a693ffe9a8c0f3125426 100644 (file)
@@ -2182,7 +2182,7 @@ static int comedi_fasync(int fd, struct file *file, int on)
        return fasync_helper(fd, file, on, &dev->async_queue);
 }
 
-const struct file_operations comedi_fops = {
+static const struct file_operations comedi_fops = {
        .owner = THIS_MODULE,
        .unlocked_ioctl = comedi_unlocked_ioctl,
        .compat_ioctl = comedi_compat_ioctl,
@@ -2196,7 +2196,7 @@ const struct file_operations comedi_fops = {
        .llseek = noop_llseek,
 };
 
-struct class *comedi_class;
+static struct class *comedi_class;
 static struct cdev comedi_cdev;
 
 static void comedi_cleanup_legacy_minors(void)
index 006cf14c577a041e4c7768b1bcb364a53158d091..d59a29300f3139dd0531d8a46ea044babac30aef 100644 (file)
@@ -3,8 +3,6 @@
 #define _COMEDI_FOPS_H
 #include <linux/types.h>
 
-extern struct class *comedi_class;
-extern const struct file_operations comedi_fops;
 extern bool comedi_autoconfig;
 extern struct comedi_driver *comedi_drivers;