Skip to content

Commit

Permalink
Staging: comedi: kcomedilib: remove ksyms.c file
Browse files Browse the repository at this point in the history
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: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent 4bf9355 commit 7382e57
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 158 deletions.
1 change: 0 additions & 1 deletion drivers/staging/comedi/kcomedilib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ obj-$(CONFIG_COMEDI) += kcomedilib.o

kcomedilib-objs := \
data.o \
ksyms.o \
dio.o \
kcomedilib_main.o \
get.o
3 changes: 3 additions & 0 deletions drivers/staging/comedi/kcomedilib/dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -93,3 +95,4 @@ int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,

return ret;
}
EXPORT_SYMBOL(comedi_dio_bitfield);
18 changes: 9 additions & 9 deletions drivers/staging/comedi/kcomedilib/get.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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);

Expand All @@ -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;
}
Expand All @@ -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;

Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/comedi/kcomedilib/kcomedilib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -68,6 +68,7 @@ void *comedi_open(const char *filename)

return (void *)dev;
}
EXPORT_SYMBOL(comedi_open);

void *comedi_open_old(unsigned int minor)
{
Expand Down Expand Up @@ -96,6 +97,7 @@ int comedi_close(void *d)

return 0;
}
EXPORT_SYMBOL(comedi_close);

int comedi_loglevel(int newlevel)
{
Expand All @@ -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)
Expand Down
146 changes: 0 additions & 146 deletions drivers/staging/comedi/kcomedilib/ksyms.c

This file was deleted.

0 comments on commit 7382e57

Please sign in to comment.