]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: rti800: remove adc_range from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 01:17:01 +0000 (18:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2013 23:29:04 +0000 (16:29 -0700)
The 'adc_range' is only used in the attach of the board. Remove it
from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/rti800.c

index 8fb8af0441598ddb73c0a0abff8f873304ba8522..583a4ed07b4cbf83f38857318b10f61270b81a8d 100644 (file)
@@ -139,9 +139,6 @@ static const struct rti800_board rti800_boardtypes[] = {
 };
 
 struct rti800_private {
-       enum {
-               adc_bipolar10, adc_bipolar5, adc_unipolar10
-       } adc_range;
        enum {
                adc_2comp, adc_straight
        } adc_coding;
@@ -313,7 +310,6 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                return -ENOMEM;
        dev->private = devpriv;
 
-       devpriv->adc_range = it->options[3];
        devpriv->adc_coding = it->options[4];
        devpriv->dac0_range = it->options[5];
        devpriv->dac0_coding = it->options[6];
@@ -332,14 +328,14 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s->n_chan = (it->options[2] ? 16 : 8);
        s->insn_read = rti800_ai_insn_read;
        s->maxdata = 0xfff;
-       switch (devpriv->adc_range) {
-       case adc_bipolar10:
+       switch (it->options[3]) {
+       case 0:
                s->range_table = &range_rti800_ai_10_bipolar;
                break;
-       case adc_bipolar5:
+       case 1:
                s->range_table = &range_rti800_ai_5_bipolar;
                break;
-       case adc_unipolar10:
+       case 2:
                s->range_table = &range_rti800_ai_unipolar;
                break;
        }