From: H Hartley Sweeten Date: Mon, 26 Jan 2015 23:17:16 +0000 (-0700) Subject: staging: comedi: das16: introduce das16_ai_range() X-Git-Tag: fixes-v4.0-rc1~99^2~125 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ce8280e2876091b5c67cb515fae8e9bf3b50bfd;p=pandora-kernel.git staging: comedi: das16: introduce das16_ai_range() Clarify the (*attach) a bit by introducing a helper function to handle the setup of the analog input 'range_table'. Some of the boards supported by this driver do not have programmable ranges. The analog input subdevice can use optional range information provided by the user during the attach of the driver. Currently this range data is allocated and stored in the private data. Use the subdevice private data member instead and allocate the memory with comedi_alloc_spriv(). The comedi core will automatically free this memory when the driver is detached. If the allocation fails set the 'range_table' to 'range_unknown' instead of failing the driver attach. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed