]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: rti800: remove dac[01]_range from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 01:17:22 +0000 (18:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2013 23:29:05 +0000 (16:29 -0700)
The 'dac[01]_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 583a4ed07b4cbf83f38857318b10f61270b81a8d..6eb470a623ca104c80b9e8e2e0081637ca8767e3 100644 (file)
@@ -142,9 +142,6 @@ struct rti800_private {
        enum {
                adc_2comp, adc_straight
        } adc_coding;
-       enum {
-               dac_bipolar10, dac_unipolar10
-       } dac0_range, dac1_range;
        enum {
                dac_2comp, dac_straight
        } dac0_coding, dac1_coding;
@@ -311,9 +308,7 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->private = devpriv;
 
        devpriv->adc_coding = it->options[4];
-       devpriv->dac0_range = it->options[5];
        devpriv->dac0_coding = it->options[6];
-       devpriv->dac1_range = it->options[7];
        devpriv->dac1_coding = it->options[8];
        devpriv->muxgain_bits = -1;
 
@@ -350,19 +345,19 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                s->insn_write = rti800_ao_insn_write;
                s->maxdata = 0xfff;
                s->range_table_list = devpriv->ao_range_type_list;
-               switch (devpriv->dac0_range) {
-               case dac_bipolar10:
+               switch (it->options[5]) {
+               case 0:
                        devpriv->ao_range_type_list[0] = &range_bipolar10;
                        break;
-               case dac_unipolar10:
+               case 1:
                        devpriv->ao_range_type_list[0] = &range_unipolar10;
                        break;
                }
-               switch (devpriv->dac1_range) {
-               case dac_bipolar10:
+               switch (it->options[7]) {
+               case 0:
                        devpriv->ao_range_type_list[1] = &range_bipolar10;
                        break;
-               case dac_unipolar10:
+               case 1:
                        devpriv->ao_range_type_list[1] = &range_unipolar10;
                        break;
                }