Commit 94d37836 authored by Spencer E. Olson's avatar Spencer E. Olson Committed by Luis Henriques

staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg

commit 1fd24a47 upstream.

This fixes a bug in function ni_tio_input_inttrig().  The trigger number
should be compared to cmd->start_arg, not cmd->start_src.

Fixes: 6a760394 ("staging: comedi: ni_tiocmd: clarify the cmd->start_arg validation and use")
Signed-off-by: default avatarSpencer E. Olson <olsonse@umich.edu>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent a6a2cb78
...@@ -98,7 +98,7 @@ static int ni_tio_input_inttrig(struct comedi_device *dev, ...@@ -98,7 +98,7 @@ static int ni_tio_input_inttrig(struct comedi_device *dev,
BUG_ON(counter == NULL); BUG_ON(counter == NULL);
if (trig_num != cmd->start_src) if (trig_num != cmd->start_arg)
return -EINVAL; return -EINVAL;
spin_lock_irqsave(&counter->lock, flags); spin_lock_irqsave(&counter->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment