Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: comedi: improve comedi_check_chanlist() documentation

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ian Abbott and committed by
Greg Kroah-Hartman
d27da4da 1a59adb2

+12 -1
+12 -1
drivers/staging/comedi/range.c
··· 102 102 * @s: comedi_subdevice struct 103 103 * @n: number of elements in the chanlist 104 104 * @chanlist: the chanlist to validate 105 - */ 105 + * 106 + * Each element consists of a channel number, a range index, an analog 107 + * reference type and some flags, all packed into an unsigned int. 108 + * 109 + * This checks that the channel number and range index are supported by 110 + * the comedi subdevice. It does not check whether the analog reference 111 + * type and the flags are supported. Drivers that care should check those 112 + * themselves. 113 + * 114 + * Return: %0 if all @chanlist elements are valid (success), 115 + * %-EINVAL if one or more elements are invalid. 116 + */ 106 117 int comedi_check_chanlist(struct comedi_subdevice *s, int n, 107 118 unsigned int *chanlist) 108 119 {