From 92cbca97ea68216fc1b84d1fc4829a97d02e7082 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 8 Jan 2001 21:59:10 +0000 Subject: [PATCH] clears dev structure on attach --- comedi/drivers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/comedi/drivers.c b/comedi/drivers.c index 18e2ce20..f7ab17ff 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -91,10 +91,15 @@ int comedi_device_attach(comedi_device *dev,comedi_devconfig *it) comedi_driver *driv; int ret; int i=0; + int minor; if(dev->attached) return -EBUSY; + minor=dev->minor; + memset(dev,0,sizeof(dev)); + dev->minor=minor; + for(driv=comedi_drivers;driv;driv=driv->next){ if(driv->recognize){ i=driv->recognize(it->board_name); -- 2.26.2