diff options
author | J. Ali Harlow <ali@avrc.city.ac.uk> | 2011-05-18 19:18:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-18 14:32:06 -0700 |
commit | 510b9be374a4b589e7f6182d306b3c8ec9575e05 (patch) | |
tree | 2af1ac4c6ce8228842ba65c9554bea3f7943ce5a /drivers/staging/comedi | |
parent | 9dc99895ef2bd96bad9674e4a0a6228c0690c912 (diff) |
comedi vmk80xx: extend rudimentary_check to check both directions
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/vmk80xx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c index c86c8664101..669ebf85f57 100644 --- a/drivers/staging/comedi/drivers/vmk80xx.c +++ b/drivers/staging/comedi/drivers/vmk80xx.c @@ -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; } |