diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2012-09-24 12:20:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 13:45:38 -0400 |
commit | affdc230d7d328d2b602113e459a57d9de5ded08 (patch) | |
tree | 6c3e1a650176bd6db4fe0f44d77cff504882263e /drivers | |
parent | b655c2c4782ed3e2e71d2608154e295a3e860311 (diff) |
staging: comedi: s626: add FIXME comment
`s626_enc_insn_config()` is the `insn_config()` handler for a counter
subdevice. The `data[0]` value is supposed to be one of the
`INSN_CONFIG_...` constants defined in "comedi.h" indicating the type of
configuration instruction, but this function seems to be using it as a
variable value to preload the counter with. Various values of `data[0]`
are going to cause `check_insn_config_length()` in the comedi core
("comedi_fops.c") to return an error, and this function won't be called
in those cases. Most other values will log a warning to the kernel log.
It's not entirely clear what constant should be checked for in
`data[0]`, so add a "FIXME" comment for now.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/s626.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 430e26b9e344..24878c815fd7 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c | |||
@@ -1804,6 +1804,9 @@ static int s626_dio_insn_config(struct comedi_device *dev, | |||
1804 | /* Now this function initializes the value of the counter (data[0]) | 1804 | /* Now this function initializes the value of the counter (data[0]) |
1805 | and set the subdevice. To complete with trigger and interrupt | 1805 | and set the subdevice. To complete with trigger and interrupt |
1806 | configuration */ | 1806 | configuration */ |
1807 | /* FIXME: data[0] is supposed to be an INSN_CONFIG_xxx constant indicating | ||
1808 | * what is being configured, but this function appears to be using data[0] | ||
1809 | * as a variable. */ | ||
1807 | static int s626_enc_insn_config(struct comedi_device *dev, | 1810 | static int s626_enc_insn_config(struct comedi_device *dev, |
1808 | struct comedi_subdevice *s, | 1811 | struct comedi_subdevice *s, |
1809 | struct comedi_insn *insn, unsigned int *data) | 1812 | struct comedi_insn *insn, unsigned int *data) |