aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-10-13 09:56:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-29 15:47:11 +0800
commit781f933c151ee47e3cc1c8ef5491db23f1b61c9a (patch)
tree00503549f0cf61908ee7fe60038179c306333976 /drivers/staging/comedi/drivers.c
parentstaging: comedi: comedidev.h: don't expose COMEDI_CB_* defines to userspace (diff)
downloadlinux-dev-781f933c151ee47e3cc1c8ef5491db23f1b61c9a.tar.xz
linux-dev-781f933c151ee47e3cc1c8ef5491db23f1b61c9a.zip
staging: comedi: comedidev.h: clarify async->event error/cancel detection
Introduce COMEDI_CB_ERROR_MASK and COMEDI_CB_CANCEL_MASK to clarify the async->events that indicate errors and cancel an async command. Use the new defines to tidy up and clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers.c')
-rw-r--r--drivers/staging/comedi/drivers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 859b722188cc..ff2df8587eca 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -375,7 +375,7 @@ unsigned int comedi_handle_events(struct comedi_device *dev,
if (events == 0)
return events;
- if (events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW))
+ if (events & COMEDI_CB_CANCEL_MASK)
s->cancel(dev, s);
comedi_event(dev, s);