[PATCH 286/577] Staging: comedi: kcomedilib: remove ksyms.c file

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

 



Move only the exports that we actually use into the individual
files, and delete the ksyms.c file entirely.  This will make it
easier to start cleaning up kcomedilib (i.e. delete most of it.)

Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Frank Mori Hess <fmhess@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/comedi/kcomedilib/Makefile         |    1 -
 drivers/staging/comedi/kcomedilib/dio.c            |    3 +
 drivers/staging/comedi/kcomedilib/get.c            |   18 ++--
 .../staging/comedi/kcomedilib/kcomedilib_main.c    |    6 +-
 drivers/staging/comedi/kcomedilib/ksyms.c          |  146 --------------------
 5 files changed, 16 insertions(+), 158 deletions(-)
 delete mode 100644 drivers/staging/comedi/kcomedilib/ksyms.c

diff --git a/drivers/staging/comedi/kcomedilib/Makefile b/drivers/staging/comedi/kcomedilib/Makefile
index ffcc9ad..76de45b 100644
--- a/drivers/staging/comedi/kcomedilib/Makefile
+++ b/drivers/staging/comedi/kcomedilib/Makefile
@@ -2,7 +2,6 @@ obj-$(CONFIG_COMEDI)	+= kcomedilib.o
 
 kcomedilib-objs :=				\
 			data.o			\
-			ksyms.o			\
 			dio.o			\
 			kcomedilib_main.o	\
 			get.o
diff --git a/drivers/staging/comedi/kcomedilib/dio.c b/drivers/staging/comedi/kcomedilib/dio.c
index 30192f3..e37aa53 100644
--- a/drivers/staging/comedi/kcomedilib/dio.c
+++ b/drivers/staging/comedi/kcomedilib/dio.c
@@ -25,6 +25,7 @@
 #include "../comedilib.h"
 
 #include <linux/string.h>
+#include <linux/module.h>
 
 int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
 		      unsigned int io)
@@ -40,6 +41,7 @@ int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
 
 	return comedi_do_insn(dev, &insn);
 }
+EXPORT_SYMBOL(comedi_dio_config);
 
 int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan,
 		    unsigned int *val)
@@ -93,3 +95,4 @@ int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,
 
 	return ret;
 }
+EXPORT_SYMBOL(comedi_dio_bitfield);
diff --git a/drivers/staging/comedi/kcomedilib/get.c b/drivers/staging/comedi/kcomedilib/get.c
index 6d84187..ec072ce 100644
--- a/drivers/staging/comedi/kcomedilib/get.c
+++ b/drivers/staging/comedi/kcomedilib/get.c
@@ -81,6 +81,7 @@ int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd)
 	}
 	return -1;
 }
+EXPORT_SYMBOL(comedi_find_subdevice_by_type);
 
 int comedi_get_n_channels(void *d, unsigned int subdevice)
 {
@@ -89,6 +90,7 @@ int comedi_get_n_channels(void *d, unsigned int subdevice)
 
 	return s->n_chan;
 }
+EXPORT_SYMBOL(comedi_get_n_channels);
 
 int comedi_get_len_chanlist(void *d, unsigned int subdevice)
 {
@@ -117,11 +119,10 @@ int comedi_get_rangetype(void *d, unsigned int subdevice, unsigned int chan)
 	struct comedi_subdevice *s = dev->subdevices + subdevice;
 	int ret;
 
-	if (s->range_table_list) {
+	if (s->range_table_list)
 		ret = s->range_table_list[chan]->length;
-	} else {
+	else
 		ret = s->range_table->length;
-	}
 
 	ret = ret | (dev->minor << 28) | (subdevice << 24) | (chan << 16);
 
@@ -135,11 +136,10 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
 	struct comedi_subdevice *s = dev->subdevices + subdevice;
 	int ret;
 
-	if (s->range_table_list) {
+	if (s->range_table_list)
 		ret = s->range_table_list[chan]->length;
-	} else {
+	else
 		ret = s->range_table->length;
-	}
 
 	return ret;
 }
@@ -154,11 +154,11 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan,
 	struct comedi_subdevice *s = dev->subdevices + subdevice;
 	const struct comedi_lrange *lr;
 
-	if (s->range_table_list) {
+	if (s->range_table_list)
 		lr = s->range_table_list[chan];
-	} else {
+	else
 		lr = s->range_table;
-	}
+
 	if (range >= lr->length)
 		return -EINVAL;
 
diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
index 2229b46..32c7bbb 100644
--- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
+++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
@@ -31,7 +31,7 @@
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/mm.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include "../comedi.h"
 #include "../comedilib.h"
@@ -68,6 +68,7 @@ void *comedi_open(const char *filename)
 
 	return (void *)dev;
 }
+EXPORT_SYMBOL(comedi_open);
 
 void *comedi_open_old(unsigned int minor)
 {
@@ -96,6 +97,7 @@ int comedi_close(void *d)
 
 	return 0;
 }
+EXPORT_SYMBOL(comedi_close);
 
 int comedi_loglevel(int newlevel)
 {
@@ -104,7 +106,7 @@ int comedi_loglevel(int newlevel)
 
 void comedi_perror(const char *message)
 {
-	printk("%s: unknown error\n", message);
+	printk(KERN_ERR "%s: unknown error\n", message);
 }
 
 char *comedi_strerror(int err)
diff --git a/drivers/staging/comedi/kcomedilib/ksyms.c b/drivers/staging/comedi/kcomedilib/ksyms.c
deleted file mode 100644
index 8bf4471..0000000
--- a/drivers/staging/comedi/kcomedilib/ksyms.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-    comedi/kcomedilib/ksyms.c
-    a comedlib interface for kernel modules
-
-    COMEDI - Linux Control and Measurement Device Interface
-    Copyright (C) 1997-2001 David A. Schleef <ds@xxxxxxxxxxx>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "../comedi.h"
-#include "../comedilib.h"
-#include "../comedidev.h"
-
-#include <linux/module.h>
-
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/fcntl.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/mm.h>
-
-/* functions specific to kcomedilib */
-
-EXPORT_SYMBOL(comedi_register_callback);
-EXPORT_SYMBOL(comedi_get_krange);
-EXPORT_SYMBOL(comedi_get_buf_head_pos);
-EXPORT_SYMBOL(comedi_set_user_int_count);
-EXPORT_SYMBOL(comedi_map);
-EXPORT_SYMBOL(comedi_unmap);
-
-/* This list comes from user-space comedilib, to show which
- * functions are not ported yet. */
-
-EXPORT_SYMBOL(comedi_open);
-EXPORT_SYMBOL(comedi_close);
-
-/* logging */
-EXPORT_SYMBOL(comedi_loglevel);
-EXPORT_SYMBOL(comedi_perror);
-EXPORT_SYMBOL(comedi_strerror);
-/* EXPORT_SYMBOL(comedi_errno); */
-EXPORT_SYMBOL(comedi_fileno);
-
-/* device queries */
-EXPORT_SYMBOL(comedi_get_n_subdevices);
-EXPORT_SYMBOL(comedi_get_version_code);
-EXPORT_SYMBOL(comedi_get_driver_name);
-EXPORT_SYMBOL(comedi_get_board_name);
-
-/* subdevice queries */
-EXPORT_SYMBOL(comedi_get_subdevice_type);
-EXPORT_SYMBOL(comedi_find_subdevice_by_type);
-EXPORT_SYMBOL(comedi_get_subdevice_flags);
-EXPORT_SYMBOL(comedi_get_n_channels);
-/*
-* EXPORT_SYMBOL(comedi_range_is_chan_specific);
-* EXPORT_SYMBOL(comedi_maxdata_is_chan_specific);
-*/
-
-/* channel queries */
-EXPORT_SYMBOL(comedi_get_maxdata);
-#ifdef KCOMEDILIB_DEPRECATED
-EXPORT_SYMBOL(comedi_get_rangetype);
-#endif
-EXPORT_SYMBOL(comedi_get_n_ranges);
-/* EXPORT_SYMBOL(comedi_find_range); */
-
-/* buffer queries */
-EXPORT_SYMBOL(comedi_get_buffer_size);
-/*
-* EXPORT_SYMBOL(comedi_get_max_buffer_size);
-* EXPORT_SYMBOL(comedi_set_buffer_size);
-*/
-EXPORT_SYMBOL(comedi_get_buffer_contents);
-EXPORT_SYMBOL(comedi_get_buffer_offset);
-
-/* low-level stuff */
-/*
-* EXPORT_SYMBOL(comedi_trigger); EXPORT_SYMBOL(comedi_do_insnlist);
-*/
-EXPORT_SYMBOL(comedi_do_insn);
-EXPORT_SYMBOL(comedi_lock);
-EXPORT_SYMBOL(comedi_unlock);
-
-/* physical units */
-/*
-* EXPORT_SYMBOL(comedi_to_phys); EXPORT_SYMBOL(comedi_from_phys);
-*/
-
-/* synchronous stuff */
-EXPORT_SYMBOL(comedi_data_read);
-EXPORT_SYMBOL(comedi_data_read_hint);
-EXPORT_SYMBOL(comedi_data_read_delayed);
-EXPORT_SYMBOL(comedi_data_write);
-EXPORT_SYMBOL(comedi_dio_config);
-EXPORT_SYMBOL(comedi_dio_read);
-EXPORT_SYMBOL(comedi_dio_write);
-EXPORT_SYMBOL(comedi_dio_bitfield);
-
-/* slowly varying stuff */
-/*
-* EXPORT_SYMBOL(comedi_sv_init); EXPORT_SYMBOL(comedi_sv_update);
-* EXPORT_SYMBOL(comedi_sv_measure);
-*/
-
-/* commands */
-/*
-* EXPORT_SYMBOL(comedi_get_cmd_src_mask);
-* EXPORT_SYMBOL(comedi_get_cmd_generic_timed);
-*/
-EXPORT_SYMBOL(comedi_cancel);
-EXPORT_SYMBOL(comedi_command);
-EXPORT_SYMBOL(comedi_command_test);
-EXPORT_SYMBOL(comedi_poll);
-
-/* buffer configuration */
-EXPORT_SYMBOL(comedi_mark_buffer_read);
-EXPORT_SYMBOL(comedi_mark_buffer_written);
-
-/* EXPORT_SYMBOL(comedi_get_range); */
-EXPORT_SYMBOL(comedi_get_len_chanlist);
-
-/* deprecated */
-/*
-* EXPORT_SYMBOL(comedi_get_timer);
-* EXPORT_SYMBOL(comedi_timed_1chan);
-*/
-
-/* alpha */
-/* EXPORT_SYMBOL(comedi_set_global_oor_behavior); */
-- 
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