diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-06-18 13:16:35 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-18 17:17:10 -0700 |
commit | a2714e3e42e746d6c8525c35fdcc58fb60c2830d (patch) | |
tree | 94a4ee01bc635adc63a764939a96bc1e27a9b8a4 /drivers/staging/comedi/drivers/contec_pci_dio.c | |
parent | 520706607befd1f5c20ec14db35d6be45791bc41 (diff) |
staging: comedi: fix return value for insn_bits functions
The comedi_subdevice 'insn_bits' functions return the number of data
elements used to perform the command. Most of the insn_bits functions
return an open coded '2' to indicate this. The same value is available
as 'insn->n'. Return that instead to better indicate what the return
means.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/contec_pci_dio.c')
-rw-r--r-- | drivers/staging/comedi/drivers/contec_pci_dio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c index 6aec9a6451b6..ee769e00dc20 100644 --- a/drivers/staging/comedi/drivers/contec_pci_dio.c +++ b/drivers/staging/comedi/drivers/contec_pci_dio.c @@ -81,7 +81,7 @@ static int contec_do_insn_bits(struct comedi_device *dev, dev->iobase + thisboard->out_offs); outw(s->state, dev->iobase + thisboard->out_offs); } - return 2; + return insn->n; } static int contec_di_insn_bits(struct comedi_device *dev, @@ -94,7 +94,7 @@ static int contec_di_insn_bits(struct comedi_device *dev, data[1] = inw(dev->iobase + thisboard->in_offs); - return 2; + return insn->n; } static int contec_attach(struct comedi_device *dev, struct comedi_devconfig *it) |