Fixed check for unspecified clock period for clock source NI_MIO_RTSI_CLOCK
authorIan Abbott <abbotti@mev.co.uk>
Fri, 14 Mar 2008 15:31:22 +0000 (15:31 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 14 Mar 2008 15:31:22 +0000 (15:31 +0000)
in function ni_set_master_clock().  (Patch from Terry Barnaby of Beam Ltd.)

comedi/drivers/ni_mio_common.c

index 9229728fe9b1b260ed2532158962089fb709d1f1..3cd24abdeaa0b97b92c59659a4661fa47af1ea86 100644 (file)
@@ -5429,7 +5429,7 @@ static int ni_set_master_clock(comedi_device * dev, unsigned source,
                                devpriv->stc_writew(dev,
                                        devpriv->rtsi_trig_direction_reg,
                                        RTSI_Trig_Direction_Register);
-                               if (devpriv->clock_ns == 0) {
+                               if (period_ns == 0) {
                                        rt_printk
                                                ("%s: we don't handle an unspecified clock period correctly yet, returning error.\n",
                                                __FUNCTION__);