diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-28 23:34:49 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 21:34:44 (GMT) |
commit | 16b4775006e29fa9873881aca1d7091f93f61349 (patch) | |
tree | 8c5b12af12481e8f91f1042b8632cac9201d71d9 /drivers/staging | |
parent | d8dc10bf6888b586e284bca3e9f1a9da40590874 (diff) | |
download | linux-16b4775006e29fa9873881aca1d7091f93f61349.tar.xz |
staging: comedi: adq12b: remove 'unipolar' from private data
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/adq12b.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 4a0bbd7..40e91d7 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -114,7 +114,6 @@ static const struct comedi_lrange range_adq12b_ai_unipolar = { }; struct adq12b_private { - int unipolar; /* option 2 of comedi_config (1 is iobase) */ int differential; /* option 3 of comedi_config */ unsigned int last_ctreg; }; @@ -218,7 +217,6 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv) return -ENOMEM; - devpriv->unipolar = it->options[1]; devpriv->differential = it->options[2]; devpriv->last_ctreg = -1; /* force ctreg update */ @@ -237,10 +235,8 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) 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; |