Staging: comedi: rename check_chanlist to comedi_check_chanlist
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>
This commit is contained in:
Родитель
e42315177d
Коммит
0fd0ca75fd
|
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -160,3 +161,4 @@ int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(comedi_check_chanlist);
|
||||
|
|
Загрузка…
Ссылка в новой задаче