From: David Schleef Date: Sat, 9 Mar 2002 00:47:16 +0000 (+0000) Subject: Fix some problems noticed by check_driver X-Git-Tag: r0_7_64~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=59a213496d2d9a976ad9c7adf77a0aead28eae33;p=comedi.git Fix some problems noticed by check_driver --- diff --git a/comedi/drivers/comedi_test.c b/comedi/drivers/comedi_test.c index 4ef0aeb7..f0d2715d 100644 --- a/comedi/drivers/comedi_test.c +++ b/comedi/drivers/comedi_test.c @@ -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); - diff --git a/comedi/drivers/dt3000.c b/comedi/drivers/dt3000.c index 5e8d9732..ef2bc8b9 100644 --- a/comedi/drivers/dt3000.c +++ b/comedi/drivers/dt3000.c @@ -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 */ diff --git a/comedi/drivers/icp_multi.c b/comedi/drivers/icp_multi.c index aad81ee1..05d3ceb6 100644 --- a/comedi/drivers/icp_multi.c +++ b/comedi/drivers/icp_multi.c @@ -1,18 +1,35 @@ /* - * comedi/drivers/icp_multi.c - * - * Author: Anne Smorthit - * - * - * 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 + + 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 +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 @@ -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);