staging: comedi: pcl812: tidy up differential ai user option

Some of the boards supported by this driver can do differential analog
input when configureg with jumpers on the board. When diff. ai is used
the number of input channels is half the single-ended number of channels.
The user specifies the analog input mode for these boards when attaching
to the driver by using a configuration option.

Remove the unnecessary 'n_aichan_diff' member from the boardinfo. Add a
comment for the boards that can do differential ai.

Refactor pcl812_attach() to parse the user option before setting up the
subdevices. We can then use the 'use_diff' flag to determine if the ai
is single-ended or differential and set the subdev_flags and n_chan.

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>
1 file changed