staging: comedi: pcl730: tidy up pcl730_do_insn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 6 Jun 2013 00:48:39 +0000 (17:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 19:03:09 +0000 (12:03 -0700)
commitd015d96103afd9e2e7617e92a49a635dd8ee2a37
treeaca3c10f6882c08936dac67c4aa7705e57e2dc57
parenta32b885ebe456dc254f7b5e3b16a9d40ed86bcb4
staging: comedi: pcl730: tidy up pcl730_do_insn()

For aesthetic reasons, rename the function.

Use a local variable for the 'reg' offset that is stored in the
comedi_subdevice 'private' pointer to minimize the number of casts.
Also, add local variables for the 'mask' and 'bits'.

The outputs only need to be updated if the 'mask' indicates that the
'bits' are changing. Move the update code into the main 'if (mask)'
block.

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