/* This will stop a running acquisition operation Is called from within this driver from both the interrupt context and from comedi  */
static int usbdux_ai_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
/* This will stop a running acquisition operation Is called from within this driver from both the interrupt context and from comedi  */
static int usbdux_ai_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
{
	int ret = 0;
	if (!this_usbduxsub) {
		dev_err(&this_usbduxsub->interface->dev,
			"comedi?: usbdux_ai_stop: this_usbduxsub=NULL!\n");
		return -EFAULT;
	}
	dev_dbg(&this_usbduxsub->interface->dev, "comedi: usbdux_ai_stop\n");
	if (do_unlink) {
		ret = usbduxsub_unlink_InURBs(this_usbduxsub);
	}
	this_usbduxsub->ai_cmd_running = 0;
	return ret;
}