Fix some problems noticed by check_driver
authorDavid Schleef <ds@schleef.org>
Sat, 9 Mar 2002 00:47:16 +0000 (00:47 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 9 Mar 2002 00:47:16 +0000 (00:47 +0000)
comedi/drivers/comedi_test.c
comedi/drivers/dt3000.c
comedi/drivers/icp_multi.c

index 4ef0aeb7c1d8be3980ec54c2d8e8f4857ab00d45..f0d2715de46b68e48010c41e74dba45ddb9c855a 100644 (file)
@@ -100,6 +100,7 @@ static comedi_driver driver_waveform={
        offset:         sizeof(waveform_board),
        num_names:      sizeof(waveform_boards) / sizeof(waveform_board),
 };
+COMEDI_INITCLEANUP(driver_waveform);
 
 static int waveform_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,
        comedi_cmd *cmd);
@@ -129,7 +130,7 @@ static comedi_lrange waveform_ai_ranges =
    It should run in the background; therefore it is scheduled by
    a timer mechanism.
 */
-void waveform_ai_interrupt(unsigned long arg)
+static void waveform_ai_interrupt(unsigned long arg)
 {
        comedi_device *dev = (comedi_device*) arg;
        comedi_async *async = dev->read_subdev->async;
@@ -395,7 +396,7 @@ static int waveform_ai_cancel(comedi_device *dev, comedi_subdevice *s)
 }
 
 // divides an unsigned long long
-unsigned long long my_ull_div(unsigned long long numerator, unsigned long denominator)
+static unsigned long long my_ull_div(unsigned long long numerator, unsigned long denominator)
 {
        u32 value;
        unsigned long long remainder;
@@ -502,5 +503,3 @@ static int waveform_ai_insn_read(comedi_device *dev, comedi_subdevice *s, comedi
        return insn->n;
 }
 
-COMEDI_INITCLEANUP(driver_waveform);
-
index 5e8d97325fe3cc41e07982c64fcbfa082ba9770d..ef2bc8b982e8be47600c3f7c726b10f04becc2fe 100644 (file)
@@ -842,7 +842,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it)
 
 static int dt3000_detach(comedi_device *dev)
 {
-       if(dev->irq)free_irq(dev->irq,dev);
+       if(dev->irq)comedi_free_irq(dev->irq,dev);
 
        /* XXX */
 
index aad81ee1a24e567e4ecfd3b2b93323268e762eb9..05d3ceb6abae4ecc6c734823a610e58c88826bef 100644 (file)
@@ -1,18 +1,35 @@
 /*
- * comedi/drivers/icp_multi.c
- *
- * Author: Anne Smorthit <anne.smorthit@sfwte.ch>
- *
- *
- *  hardware driver for Inova cards:
- *   card:   ICP_MULTI
- *   driver: icp_multi
- *
- * Options:
- *  [0] - PCI bus number - if bus number and slot number are 0, 
- *                         then driver search for first unused card
- *  [1] - PCI slot number 
- * 
+    comedi/drivers/icp_multi.c
+
+    COMEDI - Linux Control and Measurement Device Interface
+    Copyright (C) 1997-2002 David A. Schleef <ds@schleef.org>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+
+/*
+Driver: icp_multi.o
+Author: Anne Smorthit <anne.smorthit@sfwte.ch>
+Devices: [Inova] ICP_MULTI (icp_multi)
+
+Options:
+ [0] - PCI bus number - if bus number and slot number are 0, 
+                        then driver search for first unused card
+ [1] - PCI slot number 
 */
 
 #include <linux/kernel.h>
@@ -1029,7 +1046,7 @@ static int icp_multi_detach(comedi_device *dev)
                        icp_multi_reset(dev);
        
        if (dev->irq)
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
 
        if (dev->iobase) {
                iounmap(devpriv->io_addr);