From: J. Ali Harlow Date: Wed, 18 May 2011 18:18:54 +0000 (+0100) Subject: comedi vmk80xx: extend rudimentary_check to check both directions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=510b9be374a4b589e7f6182d306b3c8ec9575e05;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c index c86c8664101b..669ebf85f575 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; }