From f93b399b137062b9108b2bd4cbc5f849d983c19f Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 28 May 2014 16:34:47 -0700 Subject: [PATCH] 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-format-patch failed