Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337920
b: refs/heads/master
c: bf1b202
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 15, 2012
1 parent 69910e8 commit 3df7c0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39c7bba8ccaee3bec441cb3de7763b96b1b76d94
refs/heads/master: bf1b2022ef4052953b7f8e04ee3259c061561261
19 changes: 5 additions & 14 deletions trunk/drivers/staging/comedi/drivers/gsc_hpdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,29 +641,20 @@ static int di_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
if (err)
return 2;

/* step 3: make sure arguments are trivially compatible */
/* Step 3: check if arguments are trivially valid */

if (!cmd->chanlist_len) {
cmd->chanlist_len = 32;
err++;
}
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
err |= -EINVAL;
}
err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);

switch (cmd->stop_src) {
case TRIG_COUNT:
if (!cmd->stop_arg) {
cmd->stop_arg = 1;
err++;
}
err |= cfc_check_trigger_arg_min(&cmd->stop_arg, 1);
break;
case TRIG_NONE:
if (cmd->stop_arg != 0) {
cmd->stop_arg = 0;
err++;
}
err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
break;
default:
break;
Expand Down

0 comments on commit 3df7c0f

Please sign in to comment.