From: H Hartley Sweeten Date: Fri, 1 May 2015 21:58:30 +0000 (-0700) Subject: staging: comedi: ni_mio_common: simplify ni_m_series_set_pfi_routing() X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~756 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0852f6ac1949f2d2612861ab608a5b1c614150c;p=pandora-kernel.git staging: comedi: ni_mio_common: simplify ni_m_series_set_pfi_routing() This function is overly complex due to the M_Offset_PFI_Output_Select() helper using a 1 based index for the registers and the private data using a 0 based index for the cached values. Modify the M_Offset_PFI_Output_Select() helper to use a 0 based index and remove the sanity check which can never happen. The 'n' value passed is calculated from the subdevice channel which will always be in range. Tidy up the function by using a local variable to mask/set the pfi output select bits. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed