Skip to content

Commit

Permalink
comedi vmk80xx: extend rudimentary_check to check both directions
Browse files Browse the repository at this point in the history
rudimentary_check() can currently check whether the input or
output direction is currently available (no pending transaction),
but not both at the same time. We need this facility for do_bits().

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
J. Ali Harlow authored and Greg Kroah-Hartman committed May 18, 2011
1 parent 9dc9989 commit 510b9be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ static int rudimentary_check(struct vmk80xx_usb *dev, int dir)
if (dir & DIR_IN) {
if (test_bit(TRANS_IN_BUSY, &dev->flags))
return -EBUSY;
} else { /* DIR_OUT */
}
if (dir & DIR_OUT) {
if (test_bit(TRANS_OUT_BUSY, &dev->flags))
return -EBUSY;
}
Expand Down

0 comments on commit 510b9be

Please sign in to comment.