From c24ca0e691bd5b8e2e332577a6014de9572b9194 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 4 Nov 2014 10:53:57 -0700 Subject: [PATCH] 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-format-patch failed