staging: comedi: dt2811: fix a precedence bug
Bitwise | has higher precedence than ?: so we need to add some
parenthesis for this to work as intended.
Fixes: 7c9574090d
('staging: comedi: dt2811: simplify A/D reference configuration')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c71f20ee76
commit
5ac5c3bcf5
|
@ -588,8 +588,8 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
|||
s = &dev->subdevices[0];
|
||||
s->type = COMEDI_SUBD_AI;
|
||||
s->subdev_flags = SDF_READABLE |
|
||||
(it->options[2] == 1) ? SDF_DIFF :
|
||||
(it->options[2] == 2) ? SDF_COMMON : SDF_GROUND;
|
||||
((it->options[2] == 1) ? SDF_DIFF :
|
||||
(it->options[2] == 2) ? SDF_COMMON : SDF_GROUND);
|
||||
s->n_chan = (it->options[2] == 1) ? 8 : 16;
|
||||
s->maxdata = 0x0fff;
|
||||
s->range_table = board->is_pgh ? &dt2811_pgh_ai_ranges
|
||||
|
|
Loading…
Reference in New Issue