]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: quatech_daqp_cs: use (*insn_bits) for digital inputs
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 4 Feb 2013 23:43:56 +0000 (16:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Feb 2013 19:18:58 +0000 (11:18 -0800)
commit3c41069ca451e0407a1ffa941b954d16971dae7f
treec870c8f5ac5aea48c99998e723d2e2db8bae3d10
parentacdbba285ff7453a3531a238186f9bcc0107dff4
staging: comedi: quatech_daqp_cs: use (*insn_bits) for digital inputs

Change the subdevice operation used to read the digital inputs from
a (*insn_read) to a (*insn_bits) function. The (*insn_read) functions
are expected to read 'insn->n' number of samples. The (*insn_bits)
functions just read a single sample (insn->n = 1). Change the return
from '1' to 'insn->n' to clarify what the return is.

Also, set the 'maxdata' for the subdevice. For digital io this value
should be '1' (digital io can only be 1 or 0).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/quatech_daqp_cs.c