Commit 7382e571 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: kcomedilib: remove ksyms.c file

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@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4bf93559
...@@ -2,7 +2,6 @@ obj-$(CONFIG_COMEDI) += kcomedilib.o ...@@ -2,7 +2,6 @@ obj-$(CONFIG_COMEDI) += kcomedilib.o
kcomedilib-objs := \ kcomedilib-objs := \
data.o \ data.o \
ksyms.o \
dio.o \ dio.o \
kcomedilib_main.o \ kcomedilib_main.o \
get.o get.o
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "../comedilib.h" #include "../comedilib.h"
#include <linux/string.h> #include <linux/string.h>
#include <linux/module.h>
int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan, int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
unsigned int io) unsigned int io)
...@@ -40,6 +41,7 @@ int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan, ...@@ -40,6 +41,7 @@ int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn); return comedi_do_insn(dev, &insn);
} }
EXPORT_SYMBOL(comedi_dio_config);
int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan, int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan,
unsigned int *val) unsigned int *val)
...@@ -93,3 +95,4 @@ int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask, ...@@ -93,3 +95,4 @@ int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,
return ret; return ret;
} }
EXPORT_SYMBOL(comedi_dio_bitfield);
...@@ -81,6 +81,7 @@ int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd) ...@@ -81,6 +81,7 @@ int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd)
} }
return -1; return -1;
} }
EXPORT_SYMBOL(comedi_find_subdevice_by_type);
int comedi_get_n_channels(void *d, unsigned int subdevice) int comedi_get_n_channels(void *d, unsigned int subdevice)
{ {
...@@ -89,6 +90,7 @@ 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; return s->n_chan;
} }
EXPORT_SYMBOL(comedi_get_n_channels);
int comedi_get_len_chanlist(void *d, unsigned int subdevice) 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) ...@@ -117,11 +119,10 @@ int comedi_get_rangetype(void *d, unsigned int subdevice, unsigned int chan)
struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_subdevice *s = dev->subdevices + subdevice;
int ret; int ret;
if (s->range_table_list) { if (s->range_table_list)
ret = s->range_table_list[chan]->length; ret = s->range_table_list[chan]->length;
} else { else
ret = s->range_table->length; ret = s->range_table->length;
}
ret = ret | (dev->minor << 28) | (subdevice << 24) | (chan << 16); 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) ...@@ -135,11 +136,10 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_subdevice *s = dev->subdevices + subdevice;
int ret; int ret;
if (s->range_table_list) { if (s->range_table_list)
ret = s->range_table_list[chan]->length; ret = s->range_table_list[chan]->length;
} else { else
ret = s->range_table->length; ret = s->range_table->length;
}
return ret; return ret;
} }
...@@ -154,11 +154,11 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, ...@@ -154,11 +154,11 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan,
struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_subdevice *s = dev->subdevices + subdevice;
const struct comedi_lrange *lr; const struct comedi_lrange *lr;
if (s->range_table_list) { if (s->range_table_list)
lr = s->range_table_list[chan]; lr = s->range_table_list[chan];
} else { else
lr = s->range_table; lr = s->range_table;
}
if (range >= lr->length) if (range >= lr->length)
return -EINVAL; return -EINVAL;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/io.h> #include <linux/io.h>
#include "../comedi.h" #include "../comedi.h"
#include "../comedilib.h" #include "../comedilib.h"
...@@ -68,6 +68,7 @@ void *comedi_open(const char *filename) ...@@ -68,6 +68,7 @@ void *comedi_open(const char *filename)
return (void *)dev; return (void *)dev;
} }
EXPORT_SYMBOL(comedi_open);
void *comedi_open_old(unsigned int minor) void *comedi_open_old(unsigned int minor)
{ {
...@@ -96,6 +97,7 @@ int comedi_close(void *d) ...@@ -96,6 +97,7 @@ int comedi_close(void *d)
return 0; return 0;
} }
EXPORT_SYMBOL(comedi_close);
int comedi_loglevel(int newlevel) int comedi_loglevel(int newlevel)
{ {
...@@ -104,7 +106,7 @@ int comedi_loglevel(int newlevel) ...@@ -104,7 +106,7 @@ int comedi_loglevel(int newlevel)
void comedi_perror(const char *message) 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) char *comedi_strerror(int err)
......
/*
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@schleef.org>
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); */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment