]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3b189c1168a5c5ef65e485ca67d062516b797b3f
treec025a2d1f847e5fbbf6eefab649137e06cbb6cc1
parent7bb94cac74d06493c04da90ead56a94e0c751715
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