staging: comedi: pcl711: fix pcl711_set_changain()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Sep 2013 23:40:01 +0000 (16:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Sep 2013 22:59:59 +0000 (15:59 -0700)
commitfe4489a5b2047c94ce0ce80b21e2aa3d4b657c0a
tree8e4e1b1a1c77ae1a833b54779a56549b1a284f19
parentdd89a8b60997eab41a1e92a618bd739535c58459
staging: comedi: pcl711: fix pcl711_set_changain()

Currently the board->is_8112 handling in this function does not write
the value to the mux register. Also, the value for channels >= 8 is
calculated incorrectly.

Define the magic numbers used with the mux register and fix the function
so 8112 boards work correctly.

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>
drivers/staging/comedi/drivers/pcl711.c