staging: comedi: ni_labpc: introduce labpc_range_is_unipolar()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Mar 2013 16:42:48 +0000 (09:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:41:51 +0000 (11:41 -0700)
commit43a9411a67509623ad8f9e9d3712dea449a488bf
treec3866bc48fe8b9c1c013c54f09dbd926552194f2
parent4d3cc8ab551af2452705cbccd0165dcdf1862196
staging: comedi: ni_labpc: introduce labpc_range_is_unipolar()

Introduce a helper function to determine if a range selection is
bipolar or unipolar.

This allows removing the static data 'labpc_range_is_unipolar' and
'labpc_plus_is_unipolar' as well as the boardinfo 'ai_range_is_unipolar'.

For consistency, also use the helper in labpc_ao_winsn() when
checking the range.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_labpc.h
drivers/staging/comedi/drivers/ni_labpc_cs.c