Lines Matching refs:async
170 if (s->async) { in comedi_device_detach_cleanup()
172 kfree(s->async); in comedi_device_detach_cleanup()
454 struct comedi_cmd *cmd = &s->async->cmd; in comedi_bytes_per_scan()
463 struct comedi_async *async = s->async; in __comedi_nscans_left() local
464 struct comedi_cmd *cmd = &async->cmd; in __comedi_nscans_left()
469 if (async->scans_done < cmd->stop_arg) in __comedi_nscans_left()
470 scans_left = cmd->stop_arg - async->scans_done; in __comedi_nscans_left()
515 struct comedi_async *async = s->async; in comedi_nsamples_left() local
516 struct comedi_cmd *cmd = &async->cmd; in comedi_nsamples_left()
528 comedi_bytes_to_samples(s, async->scan_progress); in comedi_nsamples_left()
549 struct comedi_async *async = s->async; in comedi_inc_scan_progress() local
550 struct comedi_cmd *cmd = &async->cmd; in comedi_inc_scan_progress()
555 async->cur_chan += comedi_bytes_to_samples(s, num_bytes); in comedi_inc_scan_progress()
556 async->cur_chan %= cmd->chanlist_len; in comedi_inc_scan_progress()
559 async->scan_progress += num_bytes; in comedi_inc_scan_progress()
560 if (async->scan_progress >= scan_length) { in comedi_inc_scan_progress()
561 unsigned int nscans = async->scan_progress / scan_length; in comedi_inc_scan_progress()
563 if (async->scans_done < (UINT_MAX - nscans)) in comedi_inc_scan_progress()
564 async->scans_done += nscans; in comedi_inc_scan_progress()
566 async->scans_done = UINT_MAX; in comedi_inc_scan_progress()
568 async->scan_progress %= scan_length; in comedi_inc_scan_progress()
569 async->events |= COMEDI_CB_EOS; in comedi_inc_scan_progress()
593 unsigned int events = s->async->events; in comedi_handle_events()
645 struct comedi_async *async; in __comedi_device_postconfig_async() local
664 async = kzalloc(sizeof(*async), GFP_KERNEL); in __comedi_device_postconfig_async()
665 if (!async) in __comedi_device_postconfig_async()
668 init_waitqueue_head(&async->wait_head); in __comedi_device_postconfig_async()
669 s->async = async; in __comedi_device_postconfig_async()
671 async->max_bufsize = comedi_default_buf_maxsize_kb * 1024; in __comedi_device_postconfig_async()
673 if (buf_size > async->max_bufsize) in __comedi_device_postconfig_async()
674 buf_size = async->max_bufsize; in __comedi_device_postconfig_async()