From: H Hartley Sweeten Date: Mon, 25 Aug 2014 22:23:56 +0000 (-0700) Subject: staging: comedi: me4000: fix aref test in ai_write_chanlist() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8d44945dc4bf4e091375b1c56bb60c12ec69a7b1;p=deliverable%2Flinux.git staging: comedi: me4000: fix aref test in ai_write_chanlist() 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 5d268e45e725..2cc5becd455f 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -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;