staging: comedi: me4000: fix aref test in ai_write_chanlist()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 25 Aug 2014 22:23:56 +0000 (15:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:20:51 +0000 (13:20 -0700)
The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are
subdevice flags. Fix the test in this function.

Reported by: coverity
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/me4000.c

index 5d268e4..2cc5bec 100644 (file)
@@ -731,7 +731,7 @@ static int ai_write_chanlist(struct comedi_device *dev,
                else
                        entry |= ME4000_AI_LIST_RANGE_BIPOLAR_10;
 
-               if (aref == SDF_DIFF)
+               if (aref == AREF_DIFF)
                        entry |= ME4000_AI_LIST_INPUT_DIFFERENTIAL;
                else
                        entry |= ME4000_AI_LIST_INPUT_SINGLE_ENDED;