s->subdev_flags|=SDF_RUNNING;
+#ifdef CONFIG_COMEDI_RT
if(s->cmd.flags&TRIG_RT){
comedi_switch_to_rt(dev);
s->runflags |= SRF_RT;
}
+#endif
ret=s->do_cmd(dev,s);
}
#ifdef LINUX_V22
-static void comedi_unmap(struct vm_area_struct *area,unsigned long x,size_t y);
-
-static struct vm_operations_struct comedi_vm_ops={
- unmap: comedi_unmap,
-};
-
/*
comedi_mmap_v22
}
s=dev->subdevices+subdev;
- if(vma->vm_pgoff != 0){
+ if(VM_OFFSET(vma) != 0){
DPRINTK("comedi: mmap() offset must be 0.\n");
return -EINVAL;
}
return 0;
}
-
-static void comedi_unmap(struct vm_area_struct *area,unsigned long x,size_t y)
-{
- printk("comedi unmap\n");
-}
-
#endif
#if LINUX_VERSION_CODE >= 0x020100
/* we do this because it's useful for the non-standard cases */
s->subdev_flags &= ~SDF_RUNNING;
+#ifdef CONFIG_COMEDI_RT
if(s->runflags&SRF_RT){
comedi_switch_to_non_rt(dev);
s->runflags &= ~SRF_RT;
}
+#endif
if(s->cur_trig.chanlist){ /* XXX wrong? */
kfree(s->cur_trig.chanlist);
subdev = s - dev->subdevices;
if(dev->rt){
+#ifdef CONFIG_COMEDI_RT
// pend wake up
if(subdev==dev->read_subdev)
comedi_rt_pend_wakeup(&dev->read_wait);
if(subdev==dev->write_subdev)
comedi_rt_pend_wakeup(&dev->write_wait);
+#endif
}else{
if(subdev==dev->read_subdev)
wake_up_interruptible(&dev->read_wait);