]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/comedi/comedi_fops.c
Merge 3.18-rc3 into staging-next
[karo-tx-linux.git] / drivers / staging / comedi / comedi_fops.c
index 9c32f027600936bcb25765b395f9d4f9406d932b..c1fe9e0e46d1222f7bbba5190e804459dc5d90da 100644 (file)
@@ -1552,9 +1552,7 @@ static int do_cmd_ioctl(struct comedi_device *dev,
 
        comedi_buf_reset(s);
 
-       async->cb_mask =
-           COMEDI_CB_EOA | COMEDI_CB_BLOCK | COMEDI_CB_ERROR |
-           COMEDI_CB_OVERFLOW;
+       async->cb_mask = COMEDI_CB_BLOCK | COMEDI_CB_CANCEL_MASK;
        if (async->cmd.flags & CMDF_WAKE_EOS)
                async->cb_mask |= COMEDI_CB_EOS;
 
@@ -1720,7 +1718,6 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg,
                           void *file)
 {
        struct comedi_subdevice *s;
-       int ret;
 
        if (arg >= dev->n_subdevices)
                return -EINVAL;
@@ -1734,9 +1731,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg,
        if (s->busy != file)
                return -EBUSY;
 
-       ret = do_cancel(dev, s);
-
-       return ret;
+       return do_cancel(dev, s);
 }
 
 /*
@@ -2395,14 +2390,14 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
        if (!comedi_is_subdevice_running(s))
                return;
 
-       if (s->
-           async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR |
-                            COMEDI_CB_OVERFLOW)) {
+       if (s->async->events & COMEDI_CB_CANCEL_MASK)
                runflags_mask |= SRF_RUNNING;
-       }
-       /* remember if an error event has occurred, so an error
-        * can be returned the next time the user does a read() */
-       if (s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) {
+
+       /*
+        * Remember if an error event has occurred, so an error
+        * can be returned the next time the user does a read().
+        */
+       if (s->async->events & COMEDI_CB_ERROR_MASK) {
                runflags_mask |= SRF_ERROR;
                runflags |= SRF_ERROR;
        }