]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Staging: comedi: clean up sparse issues in proc.c
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 May 2010 22:32:04 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:03 +0000 (11:36 -0700)
The whole file should be converted to use seqfile, if it's even
still needed.  Or move to debugfs.

Anyway, I fixed up the minor issues here.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/proc.c

index c0035cb759aac9905d5176bb2370436f551e61ee..2aa487b601870c59edcdbfd07673805e777214f8 100644 (file)
 #include "comedidev.h"
 #include "comedi_fops.h"
 #include <linux/proc_fs.h>
-/* #include <linux/string.h> */
+#include <linux/string.h>
 
-int comedi_read_procmem(char *buf, char **start, off_t offset, int len,
-                       int *eof, void *data)
+#ifdef CONFIG_PROC_FS
+static int comedi_read(char *buf, char **start, off_t offset, int len,
+                      int *eof, void *data)
 {
        int i;
        int devices_q = 0;
@@ -82,18 +83,17 @@ int comedi_read_procmem(char *buf, char **start, off_t offset, int len,
        return l;
 }
 
-#ifdef CONFIG_PROC_FS
 void comedi_proc_init(void)
 {
        struct proc_dir_entry *comedi_proc;
 
-       comedi_proc = create_proc_entry("comedi", S_IFREG | S_IRUGO, 0);
+       comedi_proc = create_proc_entry("comedi", S_IFREG | S_IRUGO, NULL);
        if (comedi_proc)
-               comedi_proc->read_proc = comedi_read_procmem;
+               comedi_proc->read_proc = comedi_read;
 }
 
 void comedi_proc_cleanup(void)
 {
-       remove_proc_entry("comedi", 0);
+       remove_proc_entry("comedi", NULL);
 }
 #endif