diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-01-26 16:17:17 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-28 11:14:04 -0800 |
commit | 23a5c3ee7c9a2e0f3bcb229bf0c14ae5971d74c9 (patch) | |
tree | f4fdd00b3f7e6a8233476292a2cf00a1ee36888f /fs/freevxfs | |
parent | 0ce8280e2876091b5c67cb515fae8e9bf3b50bfd (diff) |
staging: comedi: das16: introduce das16_ao_range()
Clarify the (*attach) a bit by introducing a helper function to handle the
setup of the analog output 'range_table'.
Some of the boards supported by this driver do not have programmable ranges.
The analog output 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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/freevxfs')
0 files changed, 0 insertions, 0 deletions