/* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.  */
static int dio200_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s, unsigned int trignum)
/* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.  */
static int dio200_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s, unsigned int trignum)
{
	struct dio200_subdev_intr *subpriv;
	unsigned long flags;
	int event = 0;
	if (trignum != 0)
		return -EINVAL;
	subpriv = s->private;
	spin_lock_irqsave(&subpriv->spinlock, flags);
	s->async->inttrig = 0;
	if (subpriv->active) {
		event = dio200_start_intr(dev, s);
	}
	spin_unlock_irqrestore(&subpriv->spinlock, flags);
	if (event) {
		comedi_event(dev, s);
	}
	return 1;
}