OSDN Git Service

staging: comedi: ni_65xx: remove 'dio_direction' from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:06:55 +0000 (12:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:22:49 +0000 (13:22 -0700)
commit11d892cc8c71f540fc50552a250a2975ac968611
treeaa4167a3e73aab0482640437321328b478f406ad
parent8405e40e841bda3aa4a261fbb278bb2fb031358c
staging: comedi: ni_65xx: remove 'dio_direction' from private data

The IO Select registers are readable. Remove the need for the
'dio_direction' member in the private data by just checking the
register value for the INSN_CONFIG_DIO_QUERY instruction.

Also, refactor the switch statement to return -EINVAL for unhandled
instructions and have the (*insn_config) return insn->n normally.

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