]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbd4ef0ea2583e8d8f7960edf494dccc4be844dd1
treeaca3c10f6882c08936dac67c4aa7705e57e2dc57
parentd8ae4f5b5d716dc795376d04eaca67bb13ebbfdf
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