From: H Hartley Sweeten Date: Tue, 4 Mar 2014 18:30:15 +0000 (-0700) Subject: staging: comedi: pcl812: cleanup setup_range_channel() X-Git-Tag: v3.15-rc1~139^2~628 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4384aaadc2289cc15a606205e6a897dd524cd0f8;p=pandora-kernel.git staging: comedi: pcl812: cleanup setup_range_channel() Move this function to remove the need for the forward declaration. Rename it so it has namespace associated with the driver. Remove the unnecessary comedi_subdevice parameter from the function. The hardware does not support analog input channel scanning so the mux and range need to be set before each (*insn_read) and when advancing to the next channel in an async command. Instead of storing the last chan/range in the private data just store the chanspec to determine if the mux and range need to be changed. Refactor pcl812_reset() a bit so we can use the helper function to set the mux and range. Define the bits in the mux register to remove the magic values. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed