From 4242d79428a067659d09f9aa4a4cbe1d7423b623 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 17 Feb 2005 22:42:09 +0000 Subject: [PATCH] patch from Emmanuel PACAUD : Here's a trivial patch that closes comedi device file when detaching comedi_rt_timer driver. --- comedi/drivers/comedi_rt_timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/comedi/drivers/comedi_rt_timer.c b/comedi/drivers/comedi_rt_timer.c index 25eae43a..cdd75b1c 100644 --- a/comedi/drivers/comedi_rt_timer.c +++ b/comedi/drivers/comedi_rt_timer.c @@ -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; } -- 2.26.2