staging: comedi: ni_6527: tidy up ni6527_di_insn_config()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 1 Oct 2013 22:10:41 +0000 (15:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 21:09:53 +0000 (14:09 -0700)
commitc6d9681b40e6dde9f8cbd922efff1f4d5433adc6
tree722c1cd51e05f142a1e0ba074d84e0f281ab6348
parente3f6ce205cbdb633df71eab61fbac13dfa466802
staging: comedi: ni_6527: tidy up ni6527_di_insn_config()

The core will validate the insn->n value based on the actual instruction
(data[0]) that is being handled. Remove the sanity check and change the
instruction handling into a switch. This follows the normal format for
(*insn_config) functions and make adding additional instructions easier.

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_6527.c