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

staging: comedi: adv_pci1710: don't check the chanlist twice



The chanlist is checked in Step 5 of the (*do_cmdtest) there is no
reason to check it again in the (*do_cmd). The only reason its done
again is to get the actual 'seglen', the non-repeating length of the
chanlist.

Save the 'seglen' found by pci171x_ai_check_chanlist() in the private
data and use that in the (*do_cmd). Rename the private data member to
clarify it. Also, remove the unused 'act_chanlist_pos' member from the
private data.

Refactor the error handling in pci171x_ai_check_chanlist() so it returns
and errno for failure and 0 for success.

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 b5a7a466
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment