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

staging: comedi: addi_apci_3120: fix apci3120_ai_insn_read()



Now that the scanning and interrupt support have been removed from this
function it can be refactored to work correctly.

The comedi core expects (*insn_read) functions to read insn->n values
from the hardware and return the number of samples read. This function
currently just reads one sample but it returns insn->n.

Fix this function to work like the core expects.

Use comedi_timeout() to prevent a possible deadlock in the loop that
waits for the end-of-conversion.

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 22f75dac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment