Commit 18e01b24 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: comedi_fops.c: reformat ioctl handler comments

The unlocked_ioctl handler calls a different function to handle each
supported ioctl command code.  Most of these have a block comment
indicating which command code it handles, a brief description, and an
informal description of the inputs and outputs.  These block comments
are formatted in various styles.  Reformat them to the usual block
comment style and do a bit of rewording for consistency.  The comment
block for the `COMEDI_CMD` ioctl is missing, so add one.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd630cde
...@@ -740,18 +740,18 @@ static int is_device_busy(struct comedi_device *dev) ...@@ -740,18 +740,18 @@ static int is_device_busy(struct comedi_device *dev)
} }
/* /*
COMEDI_DEVCONFIG * COMEDI_DEVCONFIG ioctl
device config ioctl * attaches (and configures) or detaches a legacy device
*
arg: * arg:
pointer to devconfig structure * pointer to comedi_devconfig structure (NULL if detaching)
*
reads: * reads:
devconfig structure at arg * comedi_devconfig structure (if attaching)
*
writes: * writes:
none * nothing
*/ */
static int do_devconfig_ioctl(struct comedi_device *dev, static int do_devconfig_ioctl(struct comedi_device *dev,
struct comedi_devconfig __user *arg) struct comedi_devconfig __user *arg)
{ {
...@@ -792,19 +792,18 @@ static int do_devconfig_ioctl(struct comedi_device *dev, ...@@ -792,19 +792,18 @@ static int do_devconfig_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_BUFCONFIG * COMEDI_BUFCONFIG ioctl
buffer configuration ioctl * buffer configuration
*
arg: * arg:
pointer to bufconfig structure * pointer to comedi_bufconfig structure
*
reads: * reads:
bufconfig at arg * comedi_bufconfig structure
*
writes: * writes:
modified bufconfig at arg * modified comedi_bufconfig structure
*/
*/
static int do_bufconfig_ioctl(struct comedi_device *dev, static int do_bufconfig_ioctl(struct comedi_device *dev,
struct comedi_bufconfig __user *arg) struct comedi_bufconfig __user *arg)
{ {
...@@ -854,19 +853,18 @@ static int do_bufconfig_ioctl(struct comedi_device *dev, ...@@ -854,19 +853,18 @@ static int do_bufconfig_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_DEVINFO * COMEDI_DEVINFO ioctl
device info ioctl * device info
*
arg: * arg:
pointer to devinfo structure * pointer to comedi_devinfo structure
*
reads: * reads:
none * nothing
*
writes: * writes:
devinfo structure * comedi_devinfo structure
*/
*/
static int do_devinfo_ioctl(struct comedi_device *dev, static int do_devinfo_ioctl(struct comedi_device *dev,
struct comedi_devinfo __user *arg, struct comedi_devinfo __user *arg,
struct file *file) struct file *file)
...@@ -901,19 +899,18 @@ static int do_devinfo_ioctl(struct comedi_device *dev, ...@@ -901,19 +899,18 @@ static int do_devinfo_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_SUBDINFO * COMEDI_SUBDINFO ioctl
subdevice info ioctl * subdevices info
*
arg: * arg:
pointer to array of subdevice info structures * pointer to array of comedi_subdinfo structures
*
reads: * reads:
none * nothing
*
writes: * writes:
array of subdevice info structures at arg * array of comedi_subdinfo structures
*/
*/
static int do_subdinfo_ioctl(struct comedi_device *dev, static int do_subdinfo_ioctl(struct comedi_device *dev,
struct comedi_subdinfo __user *arg, void *file) struct comedi_subdinfo __user *arg, void *file)
{ {
...@@ -975,19 +972,19 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, ...@@ -975,19 +972,19 @@ static int do_subdinfo_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_CHANINFO * COMEDI_CHANINFO ioctl
subdevice info ioctl * subdevice channel info
*
arg: * arg:
pointer to chaninfo structure * pointer to comedi_chaninfo structure
*
reads: * reads:
chaninfo structure at arg * comedi_chaninfo structure
*
writes: * writes:
arrays at elements of chaninfo structure * array of maxdata values to chaninfo->maxdata_list if requested
* array of range table lengths to chaninfo->range_table_list if requested
*/ */
static int do_chaninfo_ioctl(struct comedi_device *dev, static int do_chaninfo_ioctl(struct comedi_device *dev,
struct comedi_chaninfo __user *arg) struct comedi_chaninfo __user *arg)
{ {
...@@ -1035,20 +1032,19 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, ...@@ -1035,20 +1032,19 @@ static int do_chaninfo_ioctl(struct comedi_device *dev,
return 0; return 0;
} }
/* /*
COMEDI_BUFINFO * COMEDI_BUFINFO ioctl
buffer information ioctl * buffer information
*
arg: * arg:
pointer to bufinfo structure * pointer to comedi_bufinfo structure
*
reads: * reads:
bufinfo at arg * comedi_bufinfo structure
*
writes: * writes:
modified bufinfo at arg * modified comedi_bufinfo structure
*/
*/
static int do_bufinfo_ioctl(struct comedi_device *dev, static int do_bufinfo_ioctl(struct comedi_device *dev,
struct comedi_bufinfo __user *arg, void *file) struct comedi_bufinfo __user *arg, void *file)
{ {
...@@ -1357,19 +1353,19 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, ...@@ -1357,19 +1353,19 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn,
} }
/* /*
* COMEDI_INSNLIST * COMEDI_INSNLIST ioctl
* synchronous instructions * synchronous instruction list
* *
* arg: * arg:
* pointer to sync cmd structure * pointer to comedi_insnlist structure
* *
* reads: * reads:
* sync cmd struct at arg * comedi_insnlist structure
* instruction list * array of comedi_insn structures from insnlist->insns pointer
* data (for writes) * data (for writes) from insns[].data pointers
* *
* writes: * writes:
* data (for reads) * data (for reads) to insns[].data pointers
*/ */
/* arbitrary limits */ /* arbitrary limits */
#define MAX_SAMPLES 256 #define MAX_SAMPLES 256
...@@ -1446,18 +1442,18 @@ static int do_insnlist_ioctl(struct comedi_device *dev, ...@@ -1446,18 +1442,18 @@ static int do_insnlist_ioctl(struct comedi_device *dev,
} }
/* /*
* COMEDI_INSN * COMEDI_INSN ioctl
* synchronous instructions * synchronous instruction
* *
* arg: * arg:
* pointer to insn * pointer to comedi_insn structure
* *
* reads: * reads:
* struct comedi_insn struct at arg * comedi_insn structure
* data (for writes) * data (for writes) from insn->data pointer
* *
* writes: * writes:
* data (for reads) * data (for reads) to insn->data pointer
*/ */
static int do_insn_ioctl(struct comedi_device *dev, static int do_insn_ioctl(struct comedi_device *dev,
struct comedi_insn __user *arg, void *file) struct comedi_insn __user *arg, void *file)
...@@ -1589,6 +1585,20 @@ static int __comedi_get_user_chanlist(struct comedi_device *dev, ...@@ -1589,6 +1585,20 @@ static int __comedi_get_user_chanlist(struct comedi_device *dev,
return 0; return 0;
} }
/*
* COMEDI_CMD ioctl
* asynchronous acquisition command set-up
*
* arg:
* pointer to comedi_cmd structure
*
* reads:
* comedi_cmd structure
* channel/range list from cmd->chanlist pointer
*
* writes:
* possibly modified comedi_cmd structure (when -EAGAIN returned)
*/
static int do_cmd_ioctl(struct comedi_device *dev, static int do_cmd_ioctl(struct comedi_device *dev,
struct comedi_cmd __user *arg, void *file) struct comedi_cmd __user *arg, void *file)
{ {
...@@ -1684,20 +1694,19 @@ static int do_cmd_ioctl(struct comedi_device *dev, ...@@ -1684,20 +1694,19 @@ static int do_cmd_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_CMDTEST * COMEDI_CMDTEST ioctl
command testing ioctl * asynchronous aquisition command testing
*
arg: * arg:
pointer to cmd structure * pointer to comedi_cmd structure
*
reads: * reads:
cmd structure at arg * comedi_cmd structure
channel/range list * channel/range list from cmd->chanlist pointer
*
writes: * writes:
modified cmd structure at arg * possibly modified comedi_cmd structure
*/
*/
static int do_cmdtest_ioctl(struct comedi_device *dev, static int do_cmdtest_ioctl(struct comedi_device *dev,
struct comedi_cmd __user *arg, void *file) struct comedi_cmd __user *arg, void *file)
{ {
...@@ -1740,20 +1749,18 @@ static int do_cmdtest_ioctl(struct comedi_device *dev, ...@@ -1740,20 +1749,18 @@ static int do_cmdtest_ioctl(struct comedi_device *dev,
} }
/* /*
COMEDI_LOCK * COMEDI_LOCK ioctl
lock subdevice * lock subdevice
*
arg: * arg:
subdevice number * subdevice number
*
reads: * reads:
none * nothing
*
writes: * writes:
none * nothing
*/
*/
static int do_lock_ioctl(struct comedi_device *dev, unsigned long arg, static int do_lock_ioctl(struct comedi_device *dev, unsigned long arg,
void *file) void *file)
{ {
...@@ -1776,21 +1783,18 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned long arg, ...@@ -1776,21 +1783,18 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned long arg,
} }
/* /*
COMEDI_UNLOCK * COMEDI_UNLOCK ioctl
unlock subdevice * unlock subdevice
*
arg: * arg:
subdevice number * subdevice number
*
reads: * reads:
none * nothing
*
writes: * writes:
none * nothing
*/
This function isn't protected by the semaphore, since
we already own the lock.
*/
static int do_unlock_ioctl(struct comedi_device *dev, unsigned long arg, static int do_unlock_ioctl(struct comedi_device *dev, unsigned long arg,
void *file) void *file)
{ {
...@@ -1813,19 +1817,18 @@ static int do_unlock_ioctl(struct comedi_device *dev, unsigned long arg, ...@@ -1813,19 +1817,18 @@ static int do_unlock_ioctl(struct comedi_device *dev, unsigned long arg,
} }
/* /*
COMEDI_CANCEL * COMEDI_CANCEL ioctl
cancel acquisition ioctl * cancel asynchronous acquisition
*
arg: * arg:
subdevice number * subdevice number
*
reads: * reads:
nothing * nothing
*
writes: * writes:
nothing * nothing
*/
*/
static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg, static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg,
void *file) void *file)
{ {
...@@ -1847,19 +1850,18 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg, ...@@ -1847,19 +1850,18 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg,
} }
/* /*
COMEDI_POLL ioctl * COMEDI_POLL ioctl
instructs driver to synchronize buffers * instructs driver to synchronize buffers
*
arg: * arg:
subdevice number * subdevice number
*
reads: * reads:
nothing * nothing
*
writes: * writes:
nothing * nothing
*/
*/
static int do_poll_ioctl(struct comedi_device *dev, unsigned long arg, static int do_poll_ioctl(struct comedi_device *dev, unsigned long arg,
void *file) void *file)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment