Release Z2-CT2 resource after AI command started if convert_src is neither
authorIan Abbott <abbotti@mev.co.uk>
Wed, 28 Nov 2007 11:12:17 +0000 (11:12 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 28 Nov 2007 11:12:17 +0000 (11:12 +0000)
TRIG_TIMER nor TRIG_INT.

comedi/drivers/amplc_pci230.c

index 119f8a22c839ea0fd74c2a3b1c1474ceed8bd159..42be725d1442246a248fa5d4d249ffaeb4ba7329 100644 (file)
@@ -1911,6 +1911,9 @@ static void pci230_ai_start(comedi_device * dev, comedi_subdevice * s)
                                        break;
                                }
                        }
+               } else if (cmd->convert_src != TRIG_INT) {
+                       /* No longer need Z2-CT2. */
+                       put_one_resource(dev, RES_Z2CT2, OWNER_AICMD);
                }
        }
 }