[PATCH 313/577] Staging: comedi: clean up sparse issues in proc.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Cc: Frank Mori Hess <fmhess@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/comedi/proc.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/proc.c b/drivers/staging/comedi/proc.c
index c0035cb..2aa487b 100644
--- a/drivers/staging/comedi/proc.c
+++ b/drivers/staging/comedi/proc.c
@@ -32,10 +32,11 @@
 #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
-- 
1.7.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux