summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/range.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-08-05 17:13:26 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-05 18:55:44 (GMT)
commitd27da4dae5f487d64ba52c3d505cc587c19af578 (patch)
tree472ca9d31b2cb805b5a928edfe48f11a4b9ae4a4 /drivers/staging/comedi/range.c
parent1a59adb222bc4758241eb4ff253faa5b1ebd4cab (diff)
downloadlinux-d27da4dae5f487d64ba52c3d505cc587c19af578.tar.xz
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>
Diffstat (limited to 'drivers/staging/comedi/range.c')
-rw-r--r--drivers/staging/comedi/range.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c
index 6a393b2..ce3a58a 100644
--- a/drivers/staging/comedi/range.c
+++ b/drivers/staging/comedi/range.c
@@ -102,7 +102,18 @@ int do_rangeinfo_ioctl(struct comedi_device *dev,
* @s: comedi_subdevice struct
* @n: number of elements in the chanlist
* @chanlist: the chanlist to validate
-*/
+ *
+ * Each element consists of a channel number, a range index, an analog
+ * reference type and some flags, all packed into an unsigned int.
+ *
+ * This checks that the channel number and range index are supported by
+ * the comedi subdevice. It does not check whether the analog reference
+ * type and the flags are supported. Drivers that care should check those
+ * themselves.
+ *
+ * Return: %0 if all @chanlist elements are valid (success),
+ * %-EINVAL if one or more elements are invalid.
+ */
int comedi_check_chanlist(struct comedi_subdevice *s, int n,
unsigned int *chanlist)
{