summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-06-05 18:30:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-12 17:06:39 -0700
commit2b56b35820eee978c9f4bee7e40e18ddb3d9bc26 (patch)
tree9c02e252e2559cfd2f35c1f81fbba8893ee7123e /tools/perf/scripts/python
parentfba5963c9259252747f79f778805ca7b368d9000 (diff)
staging: comedi: das08: improve test for programmable gain
`das08_ai_rinsn()` handles Comedi `INSN_READ` instructions for the AI subdevice. This programs the gain for the analog input channel if the board has support for that, and acquires data from the channel. If programmable gain is supported, the gain code is read from the array pointed to by `devpriv->pg_gainlist` indexed by the range index. The function assumes that programmable gain is supported if the AI subdevice's range table supports more than one range. Replace that with a more direct test for `devpriv->pg_gainlist` being non-NULL, as it is only initialized to a non-NULL pointer for boards that support programmable gain. This will also allow range tables to be included for convenience for those boards that support multiple ranges by DIP switches. Those boards are currently initialized to use a single "unknown" range. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions