patch from Emmanuel PACAUD <emmanuel.pacaud@univ-poitiers.fr>:
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 17 Feb 2005 22:42:09 +0000 (22:42 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 17 Feb 2005 22:42:09 +0000 (22:42 +0000)
Here's a trivial patch that closes comedi device file when detaching
comedi_rt_timer driver.

comedi/drivers/comedi_rt_timer.c

index 25eae43aeee1f239663ae3a1881b435e038bc192..cdd75b1c4102b8fe2277792e0cbb00178c3504ab 100644 (file)
@@ -700,10 +700,11 @@ static int timer_detach(comedi_device *dev)
                        rt_task_delete(devpriv->scan_task);
                        kfree(devpriv->scan_task);
                }
-               if( devpriv->timer_running )
+               if(devpriv->timer_running)
                        stop_rt_timer();
+               if(devpriv->device)
+                       comedi_close(devpriv->device);  
        }
-
        return 0;
 }