Skip to content

Commit

Permalink
Staging: comedi: rename check_chanlist to comedi_check_chanlist
Browse files Browse the repository at this point in the history
It's a global function, so properly name it and move the
export to where the function is located at.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent e423151 commit 0fd0ca7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn,
goto out;
}

ret = check_chanlist(s, 1, &insn->chanspec);
ret = comedi_check_chanlist(s, 1, &insn->chanspec);
if (ret < 0) {
ret = -EINVAL;
DPRINTK("bad chanspec\n");
Expand Down Expand Up @@ -1052,7 +1052,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
}

/* make sure each element in channel/gain list is valid */
ret = check_chanlist(s, async->cmd.chanlist_len, async->cmd.chanlist);
ret = comedi_check_chanlist(s, async->cmd.chanlist_len, async->cmd.chanlist);
if (ret < 0) {
DPRINTK("bad chanlist\n");
goto cleanup;
Expand Down Expand Up @@ -1174,7 +1174,7 @@ static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
}

/* make sure each element in channel/gain list is valid */
ret = check_chanlist(s, user_cmd.chanlist_len, chanlist);
ret = comedi_check_chanlist(s, user_cmd.chanlist_len, chanlist);
if (ret < 0) {
DPRINTK("bad chanlist\n");
goto cleanup;
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/comedi/comedi_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,3 @@ EXPORT_SYMBOL_GPL(comedi_pci_auto_config);
EXPORT_SYMBOL_GPL(comedi_pci_auto_unconfig);
EXPORT_SYMBOL_GPL(comedi_usb_auto_config);
EXPORT_SYMBOL_GPL(comedi_usb_auto_unconfig);

/* for kcomedilib */
EXPORT_SYMBOL(check_chanlist);
2 changes: 1 addition & 1 deletion drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ enum subdevice_runflags {
*/

int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg);
int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist);
int comedi_check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist);
void comedi_set_subdevice_runflags(struct comedi_subdevice *s, unsigned mask,
unsigned bits);
unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/kcomedilib/kcomedilib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ int comedi_do_insn(void *d, struct comedi_insn *insn)

/* XXX check lock */

ret = check_chanlist(s, 1, &insn->chanspec);
ret = comedi_check_chanlist(s, 1, &insn->chanspec);
if (ret < 0) {
printk("bad chanspec\n");
ret = -EINVAL;
Expand Down
4 changes: 3 additions & 1 deletion drivers/staging/comedi/range.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ static int aref_invalid(struct comedi_subdevice *s, unsigned int chanspec)
This function checks each element in a channel/gain list to make
make sure it is valid.
*/
int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist)
int comedi_check_chanlist(struct comedi_subdevice *s, int n,
unsigned int *chanlist)
{
int i;
int chan;
Expand Down Expand Up @@ -160,3 +161,4 @@ int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist)
}
return 0;
}
EXPORT_SYMBOL(comedi_check_chanlist);

0 comments on commit 0fd0ca7

Please sign in to comment.