prevent callbacks from getting run when there is no command running
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 17 Jun 2002 15:45:10 +0000 (15:45 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 17 Jun 2002 15:45:10 +0000 (15:45 +0000)
comedi/comedi_fops.c

index bea2cd2f09f41cc28426a7e921bad8be9d47a210..726f1332efc6ab999e91a43cf2d7fd7710d05661 100644 (file)
@@ -1812,6 +1812,9 @@ void comedi_event(comedi_device *dev,comedi_subdevice *s,unsigned int mask)
 
        //DPRINTK("comedi_event %x\n",mask);
 
+       if( (s->subdev_flags & SDF_RUNNING) == 0)
+               return;
+
        if(mask&COMEDI_CB_EOA){
                s->subdev_flags &= ~SDF_RUNNING;
        }