From: H Hartley Sweeten Date: Tue, 29 Apr 2014 18:08:33 +0000 (-0700) Subject: staging: comedi: adv_pci1710: don't check the chanlist twice X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~1086 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56556577d9c4b4528935ddfc5635953c956d7fc9;p=pandora-kernel.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed