Cleanups suggested by check_driver. Mostly leaky symbols, incorrect
authorDavid Schleef <ds@schleef.org>
Tue, 15 Jan 2002 11:50:54 +0000 (11:50 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 15 Jan 2002 11:50:54 +0000 (11:50 +0000)
use of free_irq() and SA_SHIRQ, and pci_device_id tables.

43 files changed:
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/amcc_s5933.c
comedi/drivers/amcc_s5933.h
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_pcidas.c
comedi/drivers/comedi_parport.c
comedi/drivers/comedi_rt_timer.c
comedi/drivers/daqboard2000.c
comedi/drivers/das16.c
comedi/drivers/das1800.c
comedi/drivers/das6402.c
comedi/drivers/dt2811.c
comedi/drivers/dt2814.c
comedi/drivers/dt2815.c
comedi/drivers/dt2817.c
comedi/drivers/dt282x.c
comedi/drivers/dt3000.c
comedi/drivers/fl512.c
comedi/drivers/ii_pci20kc.c
comedi/drivers/mpc8260cpm.c
comedi/drivers/multiq3.c
comedi/drivers/ni_670x.c
comedi/drivers/ni_at_a2150.c
comedi/drivers/ni_atmio.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/ni_pcidio.c
comedi/drivers/ni_pcimio.c
comedi/drivers/pcl711.c
comedi/drivers/pcl724.c
comedi/drivers/pcl725.c
comedi/drivers/pcl726.c
comedi/drivers/pcl812.c
comedi/drivers/pcl818.c
comedi/drivers/pcm3730.c
comedi/drivers/poc.c
comedi/drivers/quatech_daqp_cs.c
comedi/drivers/rtd520.c
comedi/drivers/rti800.c
comedi/drivers/skel.c
comedi/drivers/ssv_dnp.c

index b17e5be1f41235c3147a0c5fb014700f0a3f6414..8489d67efa24ed3383bd799da053dd5a931e5d16 100644 (file)
@@ -133,7 +133,7 @@ multiplexer.
 #define START_AI_EXT   0x01            /* start measure on external trigger */
 #define STOP_AI_EXT    0x02            /* stop measure on external trigger */
 
-comedi_lrange range_pci9118dg_hr={ 8, {
+static comedi_lrange range_pci9118dg_hr={ 8, {
        BIP_RANGE(5),
        BIP_RANGE(2.5),
        BIP_RANGE(1.25),
@@ -145,7 +145,7 @@ comedi_lrange range_pci9118dg_hr={ 8, {
        }
 };
 
-comedi_lrange range_pci9118hg={ 8, {
+static comedi_lrange range_pci9118hg={ 8, {
        BIP_RANGE(5),
        BIP_RANGE(0.5),
        BIP_RANGE(0.05),
@@ -184,6 +184,12 @@ typedef struct {
        
 } boardtype;
 
+static struct pci_device_id pci9118_pci_table[] __devinitdata = {
+       { PCI_VENDOR_ID_AMCC, 0x80d9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0 }
+};
+MODULE_DEVICE_TABLE(pci, pci9118_pci_table);
+
 static boardtype boardtypes[] =
 {
        {"pci9118dg", PCI_VENDOR_ID_AMCC, 0x80d9,
@@ -1376,7 +1382,7 @@ static int pci9118_detach(comedi_device *dev)
                if (devpriv->dmabuf_virt[1]) free_pages(devpriv->dmabuf_virt[1],devpriv->dmabuf_pages[1]);
        }
 
-       if(dev->irq) free_irq(dev->irq,dev);
+       if(dev->irq) comedi_free_irq(dev->irq,dev);
 
        if(dev->iobase) release_region(dev->iobase,this_board->iorange_9118);
                
index 9e0fe859ba82e4333a19738bb95e287ca092b552..efbd717b6d81e9c7b4a9ad762fd952a19982cb71 100644 (file)
@@ -65,6 +65,7 @@ Configuration options:
 
 #undef PCI171X_EXTDEBUG
 
+#undef DPRINTK
 #ifdef PCI171X_EXTDEBUG
 #define DPRINTK(fmt, args...) rt_printk(fmt, ## args)
 #else
@@ -207,6 +208,16 @@ typedef struct {
        unsigned int    fifo_half_size; // size of FIFO/2
 } boardtype;
 
+static struct pci_device_id pci1710_pci_table[] = __devinitdata {
+       { ADVANTECH_VENDOR, 0x1710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { ADVANTECH_VENDOR, 0x1711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { ADVANTECH_VENDOR, 0x1713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { ADVANTECH_VENDOR, 0x1720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { ADVANTECH_VENDOR, 0x1731, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0 }
+};
+MODULE_DEVICE_TABLE(pci, pci1710_pci_table);
+
 static boardtype boardtypes[] =
 {
        {"pci1710", ADVANTECH_VENDOR, 0x1710,
@@ -1271,7 +1282,7 @@ static int pci1710_detach(comedi_device *dev)
        if (dev->private) 
                if (devpriv->valid) pci1710_reset(dev);
        
-       if (dev->irq) free_irq(dev->irq,dev);
+       if (dev->irq) comedi_free_irq(dev->irq,dev);
        if (dev->iobase) release_region(dev->iobase,this_board->iorange);
 
        if (pci_list_builded) {
index 906571072d5eae765401dce2efb1fe03ad8b1e54..55655444926991adc07ef0932af81d4999bc6eda 100644 (file)
@@ -208,3 +208,30 @@ struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsign
        return card;
 }
 
+
+static int amcc_init(void)
+{
+       return 0;
+}
+
+static void amcc_cleanup(void)
+{
+
+}
+
+module_init(amcc_init);
+module_exit(amcc_cleanup);
+
+EXPORT_SYMBOL(pci_card_alloc);
+EXPORT_SYMBOL(pci_card_data);
+EXPORT_SYMBOL(pci_card_free);
+EXPORT_SYMBOL(pci_card_list_cleanup);
+EXPORT_SYMBOL(pci_card_list_display);
+EXPORT_SYMBOL(pci_card_list_init);
+EXPORT_SYMBOL(select_and_alloc_pci_card);
+EXPORT_SYMBOL(find_free_pci_card_by_device);
+EXPORT_SYMBOL(find_free_pci_card_by_position);
+EXPORT_SYMBOL(amcc_devices);
+
+
+
index 0ab8daea304a1c6a452cb1dfbe3d6695ec98f2d9..b602dfbf84439d26eb5e8053723a9c472652a885 100644 (file)
@@ -179,7 +179,7 @@ struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, uns
 int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card);
 struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot);
 
-int pci_card_alloc(struct pcilst_struct *amcc);
+//int pci_card_alloc(struct pcilst_struct *amcc);
 int pci_card_free(struct pcilst_struct *amcc);
 void pci_card_list_display(void);
 int pci_card_data(struct pcilst_struct *amcc,
index b0f85ab7a6c51757918d83d1b4b7b1a5203a281a..308ca4de68236fb9b6d9a62a97845a8469857df5 100644 (file)
@@ -369,7 +369,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
        dev->board_name = thisboard->name;
 
        /* Register the interrupt handler. */
-       irq_hdl = comedi_request_irq(devpriv->pci_dev->irq, pci230_interrupt, 0, "PCI230", dev );
+       irq_hdl = comedi_request_irq(devpriv->pci_dev->irq, pci230_interrupt, SA_SHIRQ, "amplc_pci230", dev);
        if(irq_hdl<0) {
                printk("comedi%d: amplc_pci230: unable to register irq, commands will not be available %d\n", dev->minor, devpriv->pci_dev->irq);
        }
index 7e0ac2914a4655df2b948edca01bfc9e9fbc9a0a..2f2f36c6ce3dc1fc5f3b232eaa704e708f33a77d 100644 (file)
@@ -430,7 +430,7 @@ typedef struct
  */
 static int cb_pcidas_attach(comedi_device *dev,comedi_devconfig *it);
 static int cb_pcidas_detach(comedi_device *dev);
-comedi_driver driver_cb_pcidas={
+static comedi_driver driver_cb_pcidas={
        driver_name:    "cb_pcidas",
        module:         THIS_MODULE,
        attach:         cb_pcidas_attach,
index b43732bd5c962689059c543d06d586eeff548e5e..4c2802b0e1c67b4afd2a60cfeb4dd1a753f1bf12 100644 (file)
@@ -73,7 +73,7 @@ to change this, at least on a standard parallel port.
 Subdevice 3 pretends to be a digital input subdevice, but it always
 returns 0 when read.  However, if you run a command with
 scan_begin_src=TRIG_EXT, it uses pin 13 as a external triggering
-pin, which can be used to wake up tasks.
+pin, which can be used to wake up tasks.  (or is that pin 10. --ds)
 */
 /*
 
@@ -107,7 +107,7 @@ pin, which can be used to wake up tasks.
 
 static int parport_attach(comedi_device *dev,comedi_devconfig *it);
 static int parport_detach(comedi_device *dev);
-comedi_driver driver_parport={
+static comedi_driver driver_parport={
        driver_name:    "comedi_parport",
        module:         THIS_MODULE,
        attach:         parport_attach,
@@ -328,7 +328,7 @@ static int parport_attach(comedi_device *dev,comedi_devconfig *it)
        s=dev->subdevices+1;
        s->type=COMEDI_SUBD_DI;
        s->subdev_flags=SDF_READABLE;
-       s->n_chan=4;
+       s->n_chan=5;
        s->maxdata=1;
        s->range_table=&range_digital;
        s->insn_bits = parport_insn_b;
index bf2dcb577b57bb6748df1d3087110a1af7886042..44889a289e01bee630f16dfa0a9ee9931d5d8f06 100644 (file)
@@ -136,7 +136,7 @@ static int timer_detach(comedi_device *dev);
 static int timer_inttrig(comedi_device *dev, comedi_subdevice *s, unsigned int trig_num);
 static int timer_start_cmd(comedi_device *dev, comedi_subdevice *s);
 
-comedi_driver driver_timer={
+static comedi_driver driver_timer={
        module:         THIS_MODULE,
        driver_name:    "comedi_rt_timer",
        attach:         timer_attach,
index 11b3fef32dc46a6d923781ac37e78dadc50bd745..1d78e063c1da9a4e2f1d9c829c7ef66a70e51560 100644 (file)
@@ -312,7 +312,7 @@ typedef struct daqboard2000_hw {
 static int daqboard2000_attach(comedi_device *dev,comedi_devconfig *it);
 static int daqboard2000_detach(comedi_device *dev);
 
-comedi_driver driver_daqboard2000 = {
+static comedi_driver driver_daqboard2000 = {
   driver_name: "daqboard2000",
   module:      THIS_MODULE,
   attach:      daqboard2000_attach,
index 19f9e4dcb9989685afd0e7334585be0b6d55a69c..b2501037c100a091d3810428474aac805179bcc8 100644 (file)
@@ -650,7 +650,7 @@ static struct das16_board_struct das16_boards[]={
 
 static int das16_attach(comedi_device *dev,comedi_devconfig *it);
 static int das16_detach(comedi_device *dev);
-comedi_driver driver_das16={
+static comedi_driver driver_das16={
        driver_name:    "das16",
        module:         THIS_MODULE,
        attach:         das16_attach,
index 7be8e768cb9c99bf659b4b7310978a5e1ac4c889..70791551f32abd0b27c645622a7e6dd2fdf5065a 100644 (file)
@@ -501,7 +501,7 @@ static comedi_lrange range_ao_2 = {
 };
 */
 
-comedi_driver driver_das1800={
+static comedi_driver driver_das1800={
        driver_name:    "das1800",
        module:         THIS_MODULE,
        attach:         das1800_attach,
index ee5e4a59db600bf0e0a0074bc2bea0d09d68b7bd..d709fd9097cf52d5c0b072f76ccbb089123d6820 100644 (file)
@@ -103,7 +103,7 @@ Devices: [Keithley Metrabyte] DAS6402 (das6402)
 
 static int das6402_attach(comedi_device *dev,comedi_devconfig *it);
 static int das6402_detach(comedi_device *dev);
-comedi_driver driver_das6402={
+static comedi_driver driver_das6402={
        driver_name:    "das6402",
        module:         THIS_MODULE,
        attach:         das6402_attach,
@@ -316,7 +316,7 @@ static int board_init(comedi_device *dev)
 
 static int das6402_detach(comedi_device *dev)
 {
-        if(dev->irq)free_irq(dev->irq,dev);
+        if(dev->irq)comedi_free_irq(dev->irq,dev);
        if(dev->iobase)release_region(dev->iobase,DAS6402_SIZE);
 
        return 0;
index f572a4aa973ec697fd2724a843bef018f59940e7..2341e2747106f004bc157f77baea3824d0796c6c 100644 (file)
@@ -452,7 +452,7 @@ static int dt2811_detach(comedi_device * dev)
        printk("comedi%d: dt2811: remove\n", dev->minor);
 
        if (dev->irq) {
-               free_irq(dev->irq, dev);
+               comedi_free_irq(dev->irq, dev);
        }
        if(dev->iobase){
                release_region(dev->iobase, DT2811_SIZE);
index 341bfbbff584ece36264879c8cd957a296f2a2b2..c29de31be31c6ec5297bd2ac107feeea949beb35 100644 (file)
@@ -73,7 +73,7 @@ addition, the clock does not seem to be very accurate.
 
 static int dt2814_attach(comedi_device *dev,comedi_devconfig *it);
 static int dt2814_detach(comedi_device *dev);
-comedi_driver driver_dt2814={
+static comedi_driver driver_dt2814={
        driver_name:    "dt2814",
        module:         THIS_MODULE,
        attach:         dt2814_attach,
@@ -328,7 +328,7 @@ static int dt2814_detach(comedi_device *dev)
        printk("comedi%d: dt2814: remove\n",dev->minor);
        
        if(dev->irq){
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
        }
        if(dev->iobase){
                release_region(dev->iobase,DT2814_SIZE);
index dd173270fb028fe845d2c782ab5ebcb077232c3b..ab242ccd4172735cb02c7b18464621edb9ec023f 100644 (file)
@@ -85,7 +85,7 @@ static comedi_lrange range_dt2815_ao_20_current = { 1, {
 
 static int dt2815_attach(comedi_device *dev,comedi_devconfig *it);
 static int dt2815_detach(comedi_device *dev);
-comedi_driver driver_dt2815={
+static comedi_driver driver_dt2815={
        driver_name:    "dt2815",
        module:         THIS_MODULE,
        attach:         dt2815_attach,
index bd3690ac352621f0b133db7a263f0fc8cea74234..9f4964132686abb2bd3650a4a2e94d97655dff91 100644 (file)
@@ -62,7 +62,7 @@ Configuration options:
 
 static int dt2817_attach(comedi_device *dev,comedi_devconfig *it);
 static int dt2817_detach(comedi_device *dev);
-comedi_driver driver_dt2817={
+static comedi_driver driver_dt2817={
        driver_name:    "dt2817",
        module:         THIS_MODULE,
        attach:         dt2817_attach,
index fad42ba67c2c49fa65b14b5e4d131c1fbb0c4d13..5a72f31e40a96542f9836eddd9ce1f3cf1b6b726 100644 (file)
@@ -370,7 +370,7 @@ typedef struct {
 
 static int dt282x_attach(comedi_device * dev, comedi_devconfig * it);
 static int dt282x_detach(comedi_device * dev);
-comedi_driver driver_dt282x={
+static comedi_driver driver_dt282x={
        driver_name:    "dt282x",
        module:         THIS_MODULE,
        attach:         dt282x_attach,
@@ -1328,7 +1328,7 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it)
 static void free_resources(comedi_device *dev)
 {
        if (dev->irq) {
-               free_irq(dev->irq, dev);
+               comedi_free_irq(dev->irq, dev);
        }
        if(dev->iobase)
                release_region(dev->iobase, DT2821_SIZE);
index f757b37868f8f8800150f07ebbedc8819403fa8e..fc1d020ef94b036b8993c637fa6796e668941c4e 100644 (file)
@@ -247,7 +247,7 @@ typedef struct{
 
 static int dt3000_attach(comedi_device *dev,comedi_devconfig *it);
 static int dt3000_detach(comedi_device *dev);
-comedi_driver driver_dt3000={
+static comedi_driver driver_dt3000={
        driver_name:    "dt3000",
        module:         THIS_MODULE,
        attach:         dt3000_attach,
@@ -461,11 +461,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it)
        int ret=0;
        
        printk("dt3000:");
-#ifdef PCI_SUPPORT_VER1
-       if(!pcibios_present()){
-#else
        if(!pci_present()){
-#endif
                printk(" no PCI bus\n");
                return -EINVAL;
        }
@@ -548,68 +544,6 @@ static int dt3000_detach(comedi_device *dev)
 }
 
 
-#ifdef PCI_SUPPORT_VER1
-static int dt_pci_find_device(comedi_device *dev);
-static int setup_pci(comedi_device *dev);
-
-static int dt_pci_probe(comedi_device *dev)
-{
-       int board;
-       int ret;
-
-       ret=dt_pci_find_device(NULL,&board);
-       if(ret==0)
-               return 0;
-
-       setup_pci(dev);
-
-       return 1;
-}
-
-static int dt_pci_find_device(comedi_device *dev)
-{
-       int i;
-       unsigned char   pci_bus;
-       unsigned char   pci_dev_fn;
-       
-       for(i=0;i<n_dt3k_boards;i++){
-               if(pcibios_find_device(PCI_VENDOR_ID_DT,
-                       dt3k_boardtypes[i].device_id,
-                       0,
-                       &pci_bus,
-                       &pci_dev_fn) == PCIBIOS_SUCCESSFUL)
-               {
-                       devpriv->pci_bus=pci_bus;
-                       devpriv->pci_dev_fn=pci_dev_fn;
-                       dev->board_ptr=dt3k_boards+i;
-                       return 1;
-               }
-       }
-       return 0;
-}
-
-static int setup_pci(comedi_device *dev)
-{
-       unsigned long           offset;
-       u32                     addr;
-
-       pcibios_read_config_dword(devpriv->pci_bus,devpriv->pci_device_fn,
-                       PCI_BASE_ADDRESS_0,&addr);
-       devpriv->phys_addr=addr;
-       offset=devpriv->phys_addr & ~PAGE_MASK;
-       devpriv->io_addr=ioremap(devpriv->phys_addr&PAGE_MASK,DT3000_SIZE+offset)
-               +offset;
-#if DEBUG
-       printk("0x%08lx mapped to %p, ",devpriv->phys_addr,devpriv->io_addr);
-#endif
-
-       dev->iobase = (int)devpriv->io_addr;
-
-       return 0;
-}
-
-#else
-
 static struct pci_dev *dt_pci_find_device(struct pci_dev *from,int *board);
 static int setup_pci(comedi_device *dev);
 
@@ -709,5 +643,4 @@ static struct pci_dev *dt_pci_find_device(struct pci_dev *from,int *board)
 }
 
 #endif
-#endif /* PCI_SUPPORT_VER1 */
 
index 3cacb81166d683b258464621f81788e60c53a3f9..9e02001a5a6817495112d15f770682ee981f35c3 100644 (file)
@@ -49,7 +49,7 @@ static comedi_lrange range_fl512 =
 static int fl512_attach(comedi_device *dev,comedi_devconfig *it);
 static int fl512_detach(comedi_device *dev);
 
-comedi_driver driver_fl512 = {
+static comedi_driver driver_fl512 = {
  driver_name: "fl512",
  module:  THIS_MODULE,
  attach:  fl512_attach,
index d9b3d22d1a7a8854f14737ec14b43a3a76972f05..e98972aa90dba1f31c125e3476a662d70d177e9c 100644 (file)
@@ -168,7 +168,7 @@ typedef struct {
 static int pci20xxx_attach(comedi_device * dev, comedi_devconfig * it);
 static int pci20xxx_detach(comedi_device * dev);
 
-comedi_driver driver_pci20xxx = {
+static comedi_driver driver_pci20xxx = {
        driver_name:    "ii_pci20kc",
        module:         THIS_MODULE,
        attach:         pci20xxx_attach,
index 68dd457fc465182536b6e7141fc38bd2d454c890..343d0080ab1a5e4f7cc941d9725c17bb704595b4 100644 (file)
@@ -55,7 +55,7 @@ typedef struct{
 
 static int mpc8260cpm_attach(comedi_device *dev,comedi_devconfig *it);
 static int mpc8260cpm_detach(comedi_device *dev);
-comedi_driver driver_mpc8260cpm={
+static comedi_driver driver_mpc8260cpm={
        driver_name:    "dummy",
        module:         THIS_MODULE,
        attach:         mpc8260cpm_attach,
index c1316436558d5f0f874b0bed54dfed6874602b57..906fe5ce63b4e5ac37d0f2ed5de1505ac93590a8 100644 (file)
@@ -95,7 +95,7 @@ Devices: [Quanser Consulting] MultiQ-3 (multiq3)
 
 static int multiq3_attach(comedi_device *dev,comedi_devconfig *it);
 static int multiq3_detach(comedi_device *dev);
-comedi_driver driver_multiq3={
+static comedi_driver driver_multiq3={
        driver_name:    "multiq3",
        module:         THIS_MODULE,
        attach:         multiq3_attach,
index 124f5de85ceb9f2ee8b84c914ef8ed87c7a912b9..780be78ce50920e689cb909f5b894f59166307c8 100644 (file)
@@ -72,7 +72,7 @@ typedef struct ni_670x_board_struct
        unsigned short ao_chans;
        unsigned short ao_bits;
 }ni_670x_board;
-ni_670x_board ni_670x_boards[] = 
+static ni_670x_board ni_670x_boards[] = 
 {
        {
        dev_id          : 0x2c90,
index d3f9b0ac51c95639e7f5bfb95b9a20a5022b89b7..b6233f37df25322bc1a6d2595ce2d7de541e689d 100644 (file)
@@ -178,7 +178,7 @@ static int a2150_attach(comedi_device *dev,comedi_devconfig *it);
 static int a2150_detach(comedi_device *dev);
 static int a2150_cancel(comedi_device *dev, comedi_subdevice *s);
 
-comedi_driver driver_a2150={
+static comedi_driver driver_a2150={
        driver_name:    "ni_at_a2150",
        module:         THIS_MODULE,
        attach:         a2150_attach,
index fdc9ad99cb7da4a117635f43c208d3893bebee7c..1dccaf4c15b9a3dfbdab0c51687d1ca23864f67f 100644 (file)
@@ -275,7 +275,7 @@ typedef struct{
 
 static int ni_atmio_attach(comedi_device *dev,comedi_devconfig *it);
 static int ni_atmio_detach(comedi_device *dev);
-comedi_driver driver_atmio={
+static comedi_driver driver_atmio={
        driver_name:    "ni_atmio",
        module:         THIS_MODULE,
        attach:         ni_atmio_attach,
index fcf490b9898d759516cabc1a46582a74bb99b168..f4d8a1e671ddc75a7a2354792aeac288097ea4bc 100644 (file)
@@ -144,7 +144,7 @@ static void reset_counters(comedi_device *dev);
 static void reset_atmio16d(comedi_device *dev);
 
 /* main driver struct */
-comedi_driver driver_atmio16d={
+static comedi_driver driver_atmio16d={
        driver_name:    "atmio16",
        module:     THIS_MODULE,
        attach:     atmio16d_attach,
@@ -867,7 +867,7 @@ static int atmio16d_detach(comedi_device * dev)
                subdev_8255_cleanup(dev,dev->subdevices + 3);
 
        if(dev->irq)
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
 
        reset_atmio16d(dev);
        
index be65409c8156b66a0b9a8bb57354083c72805a67..267028622e9a0deba9f71f2ebf4a6c0558b53566 100644 (file)
@@ -1728,7 +1728,7 @@ static int ni_ao_cmd(comedi_device *dev,comedi_subdevice *s)
                }
 
                /* not all boards can deglitch, but this shouldn't hurt */
-               if(cmd->flags & TRIG_DEGLITCH) /* XXX ? */
+               if(cmd->chanlist[i] & CR_DITHER)
                        conf |= AO_Deglitch;
 
                /* analog reference */
index d674cc2a085c511e961859f0c82261072ea5b547..f73cf7d246aea4989b73c646a5ad45384412b56e 100644 (file)
@@ -168,7 +168,7 @@ typedef struct{
 
 static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it);
 static int mio_cs_detach(comedi_device *dev);
-comedi_driver driver_ni_mio_cs={
+static comedi_driver driver_ni_mio_cs={
        driver_name:    "ni_mio_cs",
        module:         THIS_MODULE,
        attach:         mio_cs_attach,
index 09d3f3eb15d012ceabdbdc7ad206790848f97940..b3968006aaf340fc6aee80f653fe3a7c3e5fe697 100644 (file)
@@ -173,7 +173,7 @@ AT-MIO96.
 
 static int nidio_attach(comedi_device *dev,comedi_devconfig *it);
 static int nidio_detach(comedi_device *dev);
-comedi_driver driver_pcidio={
+static comedi_driver driver_pcidio={
        driver_name:    "ni_pcidio",
        module:         THIS_MODULE,
        attach:         nidio_attach,
index efc710049aeeeadf96705378b57191953cef08bc..cab96086fc524b95d947a1a29e01427eef1c32cf 100644 (file)
@@ -525,7 +525,7 @@ static ni_board ni_boards[]={
 
 static int pcimio_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcimio_detach(comedi_device *dev);
-comedi_driver driver_pcimio={
+static comedi_driver driver_pcimio={
        driver_name:    "ni_pcimio",
        module:         THIS_MODULE,
        attach:         pcimio_attach,
index fb110bfce8e759c70d68fdfd0390fdc06cfb633c..f0dee5708b05b4dffb4f0b3797e01ed629f58360 100644 (file)
@@ -490,7 +490,7 @@ static int pcl711_detach(comedi_device * dev)
        printk("comedi%d: pcl711: remove\n", dev->minor);
 
        if (dev->irq)
-               free_irq(dev->irq, dev);
+               comedi_free_irq(dev->irq, dev);
 
        if (dev->iobase)
                release_region(dev->iobase, PCL711_SIZE);
index d92fb09cc04177979abffb90a9ee1417f2c769f8..2f20109909f830fb82034c85083a7b63f85deb95 100644 (file)
@@ -90,7 +90,7 @@ static boardtype boardtypes[] =
 #define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
 #define this_board ((boardtype *)dev->board_ptr)
 
-comedi_driver driver_pcl724={
+static comedi_driver driver_pcl724={
        driver_name:    "pcl724",
        module:         THIS_MODULE,
        attach:         pcl724_attach,
@@ -207,7 +207,7 @@ static int pcl724_detach(comedi_device *dev)
 
 #ifdef PCL724_IRQ
        if(dev->irq){
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
        }
 #endif
 
index 7d438ddfb91b615ae6b1f518169f4e763a7c7cd0..f9c7e5eae2daf6407624ef9fb224578f299bb035 100644 (file)
@@ -33,7 +33,7 @@ Devices: [Advantech] PCL-725 (pcl725)
 
 static int pcl725_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcl725_detach(comedi_device *dev);
-comedi_driver driver_pcl725={
+static comedi_driver driver_pcl725={
        driver_name:    "pcl725",
        module:         THIS_MODULE,
        attach:         pcl725_attach,
index 9eeb9de951bdb80a76ef395b52e97c588b82a6f2..924a14ca085454130f4ff64063931e5992e4f4cf 100644 (file)
@@ -368,7 +368,7 @@ static int pcl726_detach(comedi_device *dev)
        
 #ifdef ACL6126_IRQ
        if(dev->irq){
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
        }
 #endif
 
index e511686adc93649116c2d3a49cae78d1027a0187..233e342cd0439ca5eaa768d4f4f68bdd4da048cf 100644 (file)
@@ -1136,7 +1136,7 @@ static void free_resources(comedi_device * dev)
                        free_dma(devpriv->dma);
        }
        if (dev->irq)
-               free_irq(dev->irq, dev);
+               comedi_free_irq(dev->irq, dev);
        if (dev->iobase)
                release_region(dev->iobase, this_board->io_range);
 }
index 85080de1377d452b897b8642ccb61b4777e3e07c..e6e8017cbd6ec66594f83a2706e18151a5a1d314 100644 (file)
@@ -1392,7 +1392,7 @@ static void free_resources(comedi_device * dev)
                if (devpriv->dma) free_dma(devpriv->dma);
                if (devpriv->dmabuf[0]) free_pages(devpriv->dmabuf[0], devpriv->dmapages[0]);
                if (devpriv->dmabuf[1]) free_pages(devpriv->dmabuf[1], devpriv->dmapages[1]);
-               if (devpriv->rtc_irq) free_irq(devpriv->rtc_irq, dev);
+               if (devpriv->rtc_irq) comedi_free_irq(devpriv->rtc_irq, dev);
                if ((devpriv->dma_rtc)&&(RTC_lock==1)) {
                        if (devpriv->rtc_iobase)
                                release_region(devpriv->rtc_iobase, devpriv->rtc_iosize);
@@ -1483,7 +1483,7 @@ static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
                devpriv->rtc_iobase=RTC_PORT(0);
                devpriv->rtc_iosize=RTC_IO_EXTENT;
                RTC_lock++;
-               if (!comedi_request_irq(RTC_IRQ, interrupt_pcl818_ai_mode13_dma_rtc, SA_SHIRQ, "pcl818 DMA (RTC)", dev)) {
+               if (!comedi_request_irq(RTC_IRQ, interrupt_pcl818_ai_mode13_dma_rtc, 0, "pcl818 DMA (RTC)", dev)) {
                        devpriv->dma_rtc=1;
                        devpriv->rtc_irq=RTC_IRQ;
                        rt_printk(", dma_irq=%d", devpriv->rtc_irq);
index 2e509e12d64a6d4d640f1a0a7f43f561d6e52653..f7fb1d5d706e624cb3720503c41f7d9ff5802b3f 100644 (file)
@@ -40,7 +40,7 @@ Configuration options:
 
 static int pcm3730_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcm3730_detach(comedi_device *dev);
-comedi_driver driver_pcm3730={
+static comedi_driver driver_pcm3730={
        driver_name:    "pcm3730",
        module:         THIS_MODULE,
        attach:         pcm3730_attach,
index 73b07610a257c7c030c6e68393fcdba4a1244247..0c0daa209f1f051af5e66448022269e38398d748 100644 (file)
@@ -87,7 +87,7 @@ static struct boarddef_struct boards[]={
 #define n_boards (sizeof(boards)/sizeof(boards[0]))
 #define this_board ((struct boarddef_struct *)dev->board_ptr)
 
-comedi_driver driver_poc=
+static comedi_driver driver_poc=
 {
        driver_name:    "poc",
        module:         THIS_MODULE,
index 619c57315dbafab16f57f736e4dabb0ba88a2021..cb46011048dfab76215ee08bd7e4951aa8e73568 100644 (file)
@@ -238,7 +238,7 @@ static comedi_lrange range_daqp_ai = { 4, {
 
 static int daqp_attach(comedi_device *dev,comedi_devconfig *it);
 static int daqp_detach(comedi_device *dev);
-comedi_driver driver_daqp={
+static comedi_driver driver_daqp={
        driver_name:    "daqp",
        module:         THIS_MODULE,
        attach:         daqp_attach,
index 43f1ffbc7829027ea237e8181246ac4bffa8ad42..f1b005556cdb3cb7b94808b99ed3adbf6a85de84 100644 (file)
@@ -709,7 +709,7 @@ static int rtd_attach (
     dev->irq = devpriv->pci_dev->irq;
     if(dev->irq>0){
        if((ret=comedi_request_irq (dev->irq, rtd_interrupt,
-                                   0, "rtd520", dev))<0)
+                                   SA_SHIRQ, "rtd520", dev))<0)
            return ret;
        printk("( irq = %d )\n", dev->irq);
     } else {
index e3af55bf6ee366b226f7fb32ffb97e662d834a2c..73d70dc3d258b064a7fe102ef443a93b05acf12f 100644 (file)
@@ -443,7 +443,7 @@ static int rti800_detach(comedi_device * dev)
                release_region(dev->iobase, RTI800_SIZE);
 
        if(dev->irq)
-               free_irq(dev->irq,dev);
+               comedi_free_irq(dev->irq,dev);
 
        return 0;
 }
index 7b90e0e31018a7ead7fec28c785ff51692c68041..b0f54abc85653afb316de30166b8670b5b6a986f 100644 (file)
@@ -82,6 +82,8 @@ static skel_board skel_boards[] = {
 
 /* This is used by modprobe to translate PCI IDs to drivers.  Should
  * only be used for PCI and ISA-PnP devices */
+/* Please add your PCI vendor ID to comedidev.h, and it will be forwarded
+ * upstream. */
 #define PCI_VENDOR_ID_SKEL 0xdafe
 static struct pci_device_id skel_pci_table[] __devinitdata = {
        { PCI_VENDOR_ID_SKEL, 0x0100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
index 835cd3d8d25bd25c3edce532cb7e898c77d6abc6..b839533021a52caa4c35a16c3371352076d57a07 100644 (file)
@@ -72,7 +72,7 @@ typedef struct dnp_board_struct{
        int have_dio;
 } dnp_board;
 
-dnp_board dnp_boards[] = {              /* we only support one DNP 'board'   */
+static dnp_board dnp_boards[] = {              /* we only support one DNP 'board'   */
        {                               /* variant at the moment             */
        name:           "dnp-1486",
        ai_chans:       16,
@@ -106,7 +106,7 @@ typedef struct{
 static int dnp_attach(comedi_device *dev,comedi_devconfig *it);
 static int dnp_detach(comedi_device *dev);
 
-comedi_driver driver_dnp = {
+static comedi_driver driver_dnp = {
   driver_name:  "ssv_dnp",
   module:       THIS_MODULE,
   attach:       dnp_attach,
@@ -200,10 +200,6 @@ static int dnp_attach(comedi_device *dev,comedi_devconfig *it)
 static int dnp_detach(comedi_device *dev)
 {
 
-  /* deallocate I/O ports:                                                   */
-# warning region should be released here!
-  /*release_region(0x22,2);*/
-  
   /* configure all ports as input (default)                                  */
   outb(PAMR,CSCIR); outb(0x00,CSCDR);
   outb(PBMR,CSCIR); outb(0x00,CSCDR);