Lines Matching refs:async

169 			if (s->async) {
171 kfree(s->async);
454 struct comedi_cmd *cmd = &s->async->cmd;
463 struct comedi_async *async = s->async;
464 struct comedi_cmd *cmd = &async->cmd;
469 if (async->scans_done < cmd->stop_arg)
470 scans_left = cmd->stop_arg - async->scans_done;
484 * async buffer.
486 * If the async command has a stop_src of %TRIG_COUNT, the @nscans will be
515 struct comedi_async *async = s->async;
516 struct comedi_cmd *cmd = &async->cmd;
528 comedi_bytes_to_samples(s, async->scan_progress);
549 struct comedi_async *async = s->async;
550 struct comedi_cmd *cmd = &async->cmd;
555 async->cur_chan += comedi_bytes_to_samples(s, num_bytes);
556 async->cur_chan %= cmd->chanlist_len;
559 async->scan_progress += num_bytes;
560 if (async->scan_progress >= scan_length) {
561 unsigned int nscans = async->scan_progress / scan_length;
563 if (async->scans_done < (UINT_MAX - nscans))
564 async->scans_done += nscans;
566 async->scans_done = UINT_MAX;
568 async->scan_progress %= scan_length;
569 async->events |= COMEDI_CB_EOS;
593 unsigned int events = s->async->events;
645 struct comedi_async *async;
652 "async subdevices must support SDF_CMD_READ or SDF_CMD_WRITE\n");
657 "async subdevices must have a do_cmdtest() function\n");
662 "async subdevices should have a cancel() function\n");
664 async = kzalloc(sizeof(*async), GFP_KERNEL);
665 if (!async)
668 init_waitqueue_head(&async->wait_head);
669 s->async = async;
671 async->max_bufsize = comedi_default_buf_maxsize_kb * 1024;
673 if (buf_size > async->max_bufsize)
674 buf_size = async->max_bufsize;