From: H Hartley Sweeten Date: Wed, 28 May 2014 23:34:47 +0000 (-0700) Subject: staging: comedi: adq12b: fix ctreg (ai channel/range) programming X-Git-Tag: omap-for-v3.17/fixes-against-rc2~166^2~1990 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f93b399b137062b9108b2bd4cbc5f849d983c19f;p=pandora-kernel.git staging: comedi: adq12b: fix ctreg (ai channel/range) programming This driver only updates the ctreg (ai channel/range) register if the desired channel or range has changed since the last analog input read operation. It does this becuase the hardware requires an udelay to allow the multiplexor to settle. Unfortunatly the current code never updates the 'last_channel' and 'last_range' in the private data so the ctreg gets updated every time. Fix this and simplify it a bit by just storing the last ctreg value in the private data. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed