From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:53:57 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: tidy up devpriv->ctrl use X-Git-Tag: omap-for-v3.19/fixes-rc1~73^2~342 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c24ca0e691bd5b8e2e332577a6014de9572b9194;p=pandora-kernel.git staging: comedi: addi_apci_3120: tidy up devpriv->ctrl use The apci3120_setup_chan_list() function sets devpriv->ctrl to the scan length (PR) and scan start (PA) values and writes the value to the register. There is no need to mask the value first. The apci3120_ai_insn_read() function calles apci3120_setup_chan_list(). There is no need to clear devpriv->ctrl first or clear any additional bits and write the register again. This also fixes an incorrect use of APCI3120_DISABLE_TIMER0 to disable the timer. apci3120_cyclic_ai() also calls apci3120_setup_chan_list() so it does not need to clear devpriv->ctrl or clear any addidional bits and write the register. Update the comments in apci3120_reset() and apci3120_cancel(). Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed