staging: comedi: ni_660x: cleanup ni_660x_dio_insn_config()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 23 Oct 2012 23:29:07 +0000 (16:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 03:30:29 +0000 (20:30 -0700)
commit56c645ff7f1d57781a2231071be858cba5107678
treec025a2d1f847e5fbbf6eefab649137e06cbb6cc1
parent82327aaf2e9fada01c972b296cbfc46a2ca9d85c
staging: comedi: ni_660x: cleanup ni_660x_dio_insn_config()

This function handles all the insn_config instructions for the
digital i/o subdevice. These functions are supposed to return
the number of instruction parameters used (insn->n) or an -errno.
Fix the switch() so that the correct result is returned for all
INSN_CONFIG_* cases.

To clarify the code, add a local variable for the 'bit' used with
the instructions used to configure and query the input/output setting
of a channel.

For aesthetic reasons, add a whitespace between each case to improve
readability.

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