OSDN Git Service

staging: comedi: addi_apci_3120: tidy up devpriv->mode in apci3120_ai_cmd()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:57 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:03 +0000 (09:34 -0800)
commit28215c69885fa86be8b5e8f7269edfb4f8c1c480
tree1971a0f3a8be49ea2f4687d6e2011bf9ed03dad4
parentfdeb2f548790074dd7f9c39275b727ad00600af8
staging: comedi: addi_apci_3120: tidy up devpriv->mode in apci3120_ai_cmd()

There is no reason for the separate updates of the mode register in this
function. Refactor the code so that the mode register is only updated at
the end of the function after all the necessary bits have been set.

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/addi-data/hwdrv_apci3120.c