Commit 63a93381 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_labpc: return bool from labpc_use_continuous_mode()

This is a simple true/false test, return bool instead of int.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58cd9b91
...@@ -519,16 +519,13 @@ static unsigned int labpc_suggest_transfer_size(const struct comedi_cmd *cmd) ...@@ -519,16 +519,13 @@ static unsigned int labpc_suggest_transfer_size(const struct comedi_cmd *cmd)
} }
#endif #endif
static int labpc_use_continuous_mode(const struct comedi_cmd *cmd, static bool labpc_use_continuous_mode(const struct comedi_cmd *cmd,
enum scan_mode mode) enum scan_mode mode)
{ {
if (mode == MODE_SINGLE_CHAN) if (mode == MODE_SINGLE_CHAN || cmd->scan_begin_src == TRIG_FOLLOW)
return 1; return true;
if (cmd->scan_begin_src == TRIG_FOLLOW)
return 1;
return 0; return false;
} }
static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd, static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd,
...@@ -1042,7 +1039,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1042,7 +1039,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->cmd4 |= CMD4_ECLKRCV; devpriv->cmd4 |= CMD4_ECLKRCV;
/* XXX should discard first scan when using interval scanning /* XXX should discard first scan when using interval scanning
* since manual says it is not synced with scan clock */ * since manual says it is not synced with scan clock */
if (labpc_use_continuous_mode(cmd, mode) == 0) { if (!labpc_use_continuous_mode(cmd, mode)) {
devpriv->cmd4 |= CMD4_INTSCAN; devpriv->cmd4 |= CMD4_INTSCAN;
if (cmd->scan_begin_src == TRIG_EXT) if (cmd->scan_begin_src == TRIG_EXT)
devpriv->cmd4 |= CMD4_EOIRCV; devpriv->cmd4 |= CMD4_EOIRCV;
......
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