staging: comedi: me4000: use correct types for extracted chanspec values
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 5 Aug 2015 17:44:56 +0000 (10:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Aug 2015 22:03:29 +0000 (15:03 -0700)
The chanspec channel, range, and aref are unsigned int values. Use the
correct types when extracting them.

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 c15e731db6c00cebcbe80214dcccd9a71e8cce74..c7136c572a8a6fa753fb787bc30bd56e0a1cf6b5 100644 (file)
@@ -451,9 +451,9 @@ static int me4000_ai_insn_read(struct comedi_device *dev,
                               struct comedi_insn *insn,
                               unsigned int *data)
 {
-       int chan = CR_CHAN(insn->chanspec);
-       int rang = CR_RANGE(insn->chanspec);
-       int aref = CR_AREF(insn->chanspec);
+       unsigned int chan = CR_CHAN(insn->chanspec);
+       unsigned int rang = CR_RANGE(insn->chanspec);
+       unsigned int aref = CR_AREF(insn->chanspec);
        unsigned int entry = 0;
        unsigned int tmp;
        int ret;
@@ -1107,7 +1107,7 @@ static int me4000_ao_insn_write(struct comedi_device *dev,
                                struct comedi_insn *insn,
                                unsigned int *data)
 {
-       int chan = CR_CHAN(insn->chanspec);
+       unsigned int chan = CR_CHAN(insn->chanspec);
        unsigned int tmp;
 
        /* Stop any running conversion */