|
@@ -1705,6 +1705,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
|
|
void *file)
|
|
void *file)
|
|
{
|
|
{
|
|
struct comedi_subdevice *s;
|
|
struct comedi_subdevice *s;
|
|
|
|
+ int ret;
|
|
|
|
|
|
if (arg >= dev->n_subdevices)
|
|
if (arg >= dev->n_subdevices)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -1721,7 +1722,11 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
|
|
if (s->busy != file)
|
|
if (s->busy != file)
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
|
|
|
|
- return do_cancel(dev, s);
|
|
|
|
|
|
+ ret = do_cancel(dev, s);
|
|
|
|
+ if (comedi_get_subdevice_runflags(s) & SRF_USER)
|
|
|
|
+ wake_up_interruptible(&s->async->wait_head);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|