return s->poll(dev,s);
}
+
+/* WARNING: not portable */
+int comedi_map(unsigned int minor, unsigned int subdev, void **ptr)
+{
+ comedi_device *dev;
+ comedi_subdevice *s;
+
+ if((ret=minor_to_dev(minor,&dev))<0)
+ return ret;
+
+ if(subdev>=dev->n_subdevices)
+ return -ENODEV;
+
+ s=dev->subdevices+subdev;
+ if(!s->async)
+ return -EINVAL;
+
+ if(ptr)*ptr=s->async->prealloc_buf;
+
+ /* XXX no reference counting */
+
+ return 0;
+}
+
+/* WARNING: not portable */
+int comedi_unmap(unsigned int minor, unsigned int subdev)
+{
+ comedi_device *dev;
+ comedi_subdevice *s;
+
+ if((ret=minor_to_dev(minor,&dev))<0)
+ return ret;
+
+ if(subdev>=dev->n_subdevices)
+ return -ENODEV;
+
+ s=dev->subdevices+subdev;
+ if(!s->async)
+ return -EINVAL;
+
+ /* XXX no reference counting */
+
+ return 0;
+}
+
EXPORT_SYMBOL(comedi_open);
EXPORT_SYMBOL(comedi_close);
+EXPORT_SYMBOL(comedi_poll);
//EXPORT_SYMBOL(comedi_loglevel);
//EXPORT_SYMBOL(comedi_perror);
//EXPORT_SYMBOL(comedi_strerror);
//EXPORT_SYMBOL(comedi_get_timer);
//EXPORT_SYMBOL(comedi_timed_1chan);
//EXPORT_SYMBOL(comedi_set_global_oor_behavior);
+EXPORT_SYMBOL(comedi_map);
+EXPORT_SYMBOL(comedi_unmap);
#endif