Skip to content
Commit f93b399b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9c4261f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment