staging: comedi: ke_counter: fix ke_counter_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 3 Mar 2014 23:47:39 +0000 (16:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Mar 2014 00:40:27 +0000 (16:40 -0800)
commitd250972f93d3d73134bd8a251fed86e9e9d0dab5
tree9052e88ab57b2aa281376e5ef9e31667a4e4e000
parent99a1b98b32211713d8e544e9737a5fa20b73dce3
staging: comedi: ke_counter: fix ke_counter_insn_read()

The comedi core expects the (*insn_read) functions to read insn->n
values. Fix this function to work like the core expects.

The counters are actually 25-bit (24-bits + 1 sign bit). Instead of munging
the data when the sign bit is set just return the full 25-bit value.

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/ke_counter.c