diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-07-29 14:07:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-31 17:38:09 -0700 |
commit | 3ffb03e62a12d82f7ce1b1aaa471f780e2e42743 (patch) | |
tree | 891171c9a56676357daeb6e35519152544c23ed1 /drivers | |
parent | cb09d912e29605bc5a7bc6a204dda8c8f01cf10d (diff) | |
download | lwn-3ffb03e62a12d82f7ce1b1aaa471f780e2e42743.tar.gz lwn-3ffb03e62a12d82f7ce1b1aaa471f780e2e42743.zip |
staging: comedi: das16: remove an unnecessary check in the attach
If the user does not specify the analog output range the private data
'user_ao_range_table' will not be allocated. The comedi core will detect
the NULL s->range_table and automatically set it to &range_unknown.
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')
-rw-r--r-- | drivers/staging/comedi/drivers/das16.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index 9944f715b5da..00ecb3c010d7 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -1148,11 +1148,7 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->subdev_flags = SDF_WRITABLE; s->n_chan = 2; s->maxdata = 0x0fff; - if (devpriv->user_ao_range_table) - s->range_table = devpriv->user_ao_range_table; - else - s->range_table = &range_unknown; - + s->range_table = devpriv->user_ao_range_table; s->insn_write = das16_ao_insn_write; } else { s->type = COMEDI_SUBD_UNUSED; |