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/cb_pcidas64.c | |
parent | 520706607befd1f5c20ec14db35d6be45791bc41 (diff) | |
download | linux-rt-a2714e3e42e746d6c8525c35fdcc58fb60c2830d.tar.gz |
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/cb_pcidas64.c')
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcidas64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 7aacff3292c2..11ce3fdff195 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -3617,7 +3617,7 @@ static int di_rbits(struct comedi_device *dev, struct comedi_subdevice *s, data[1] = bits; data[0] = 0; - return 2; + return insn->n; } static int do_wbits(struct comedi_device *dev, struct comedi_subdevice *s, @@ -3633,7 +3633,7 @@ static int do_wbits(struct comedi_device *dev, struct comedi_subdevice *s, data[1] = s->state; - return 2; + return insn->n; } static int dio_60xx_config_insn(struct comedi_device *dev, @@ -3676,7 +3676,7 @@ static int dio_60xx_wbits(struct comedi_device *dev, struct comedi_subdevice *s, data[1] = readb(priv(dev)->dio_counter_iobase + DIO_DATA_60XX_REG); - return 2; + return insn->n; } static void caldac_write(struct comedi_device *dev, unsigned int channel, |