This member of the private data is only used during the attach to
determine which range table to use for the analog inputs. Remove
the member and use the comedi_devconfig option directly.
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>
};
struct adq12b_private {
- int unipolar; /* option 2 of comedi_config (1 is iobase) */
int differential; /* option 3 of comedi_config */
unsigned int last_ctreg;
};
if (!devpriv)
return -ENOMEM;
- devpriv->unipolar = it->options[1];
devpriv->differential = it->options[2];
devpriv->last_ctreg = -1; /* force ctreg update */
s->n_chan = 16;
}
- if (devpriv->unipolar)
- s->range_table = &range_adq12b_ai_unipolar;
- else
- s->range_table = &range_adq12b_ai_bipolar;
+ s->range_table = it->options[1] ? &range_adq12b_ai_unipolar
+ : &range_adq12b_ai_bipolar;
s->maxdata = 0xfff;