Got rid of useless 3rd parameter of comedi_event().
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 27 Jul 2007 21:00:12 +0000 (21:00 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 27 Jul 2007 21:00:12 +0000 (21:00 +0000)
40 files changed:
comedi/comedi_fops.c
comedi/drivers/8255.c
comedi/drivers/adl_pci9111.c
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/amplc_dio200.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pci224.c
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_pcidas.c
comedi/drivers/comedi_fc.c
comedi/drivers/comedi_parport.c
comedi/drivers/comedi_test.c
comedi/drivers/das16m1.c
comedi/drivers/das1800.c
comedi/drivers/das6402.c
comedi/drivers/das800.c
comedi/drivers/dmm32at.c
comedi/drivers/dt2814.c
comedi/drivers/dt282x.c
comedi/drivers/dt3000.c
comedi/drivers/me4000.c
comedi/drivers/ni_6527.c
comedi/drivers/ni_65xx.c
comedi/drivers/ni_at_a2150.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_labpc.c
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_pcidio.c
comedi/drivers/pcl711.c
comedi/drivers/pcl812.c
comedi/drivers/pcl816.c
comedi/drivers/pcl818.c
comedi/drivers/pcmmio.c
comedi/drivers/pcmuio.c
comedi/drivers/rtd520.c
comedi/drivers/s626.c
comedi/drivers/usbdux.c
comedi/drivers/usbduxfast.c
include/linux/comedidev.h

index d82ef211a8f5ab5434d64db473686d23c15ec8be..82b01d4c621bc580095be211d69f51d1775969a0 100644 (file)
@@ -1811,7 +1811,7 @@ void comedi_error(const comedi_device *dev,const char *s)
        rt_printk("comedi%d: %s: %s\n", dev->minor, dev->driver->driver_name, s);
 }
 
-void comedi_event(comedi_device *dev, comedi_subdevice *s, unsigned useless)
+void comedi_event(comedi_device *dev, comedi_subdevice *s)
 {
        comedi_async *async = s->async;
 
index 89d461033378a9344b974290a211cc3fc0c7afcd..4c118970ea7f492a5240ba654e080eb7455b0d72 100644 (file)
@@ -129,7 +129,7 @@ void subdev_8255_interrupt(comedi_device *dev, comedi_subdevice *s)
        comedi_buf_put(s->async, d);
        s->async->events |= COMEDI_CB_EOS;
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 static int subdev_8255_cb(int dir,int port,int data,unsigned long arg)
index a3de23d682804fe77ffb364553138323d62861f5..484747fa82fa2344d5535c1757497220ef4d2752 100644 (file)
@@ -967,7 +967,7 @@ pci9111_interrupt (int irq, void *p_device PT_REGS_ARG)
                        pci9111_interrupt_clear();
                        pci9111_ai_cancel (dev, subdevice);
                        async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-                       comedi_event (dev, subdevice, async->events);
+                       comedi_event (dev, subdevice);
 
                        return IRQ_HANDLED;
                }
@@ -1040,7 +1040,7 @@ pci9111_interrupt (int irq, void *p_device PT_REGS_ARG)
 
        comedi_spin_unlock_irqrestore (&dev->spinlock, irq_flags);
 
-       comedi_event (dev, subdevice, async->events);
+       comedi_event (dev, subdevice);
 
        return IRQ_HANDLED;
 }
index 61e8e42dc3270cd51777f24d3ec96764e165e1c4..4efafb5ecd39685fbb79abc41deca5487ff7017f 100644 (file)
@@ -501,7 +501,7 @@ static char pci9118_decode_error_status(comedi_device *dev,comedi_subdevice *s,u
        if (m & devpriv->ai_maskharderr) {
                s->async->events|=COMEDI_CB_ERROR|COMEDI_CB_EOA;
                pci9118_ai_cancel(dev,s);
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return 1;
        }
 
@@ -547,7 +547,7 @@ static void interrupt_pci9118_ai_onesample(comedi_device *dev,comedi_subdevice *
                        rt_printk("comedi: A/D  SAMPL - data dropout: received channel %d, expected %d!\n",sampl & 0x000f, devpriv->chanlist[s->async->cur_chan]);
                        s->async->events|=COMEDI_CB_ERROR|COMEDI_CB_EOA;
                        pci9118_ai_cancel(dev,s);
-                       comedi_event(dev,s,s->async->events);
+                       comedi_event(dev, s);
                        return;
                }
        }
@@ -565,7 +565,7 @@ static void interrupt_pci9118_ai_onesample(comedi_device *dev,comedi_subdevice *
        }
 
        if (s->async->events)
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
 }
 
 /*
@@ -580,7 +580,7 @@ static void interrupt_pci9118_ai_dma(comedi_device *dev,comedi_subdevice *s,
                comedi_error(dev,"AMCC IRQ - MASTER DMA ABORT!");
                s->async->events|=COMEDI_CB_ERROR|COMEDI_CB_EOA;
                pci9118_ai_cancel(dev,s);
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
 
@@ -588,7 +588,7 @@ static void interrupt_pci9118_ai_dma(comedi_device *dev,comedi_subdevice *s,
                comedi_error(dev,"AMCC IRQ - TARGET DMA ABORT!");
                s->async->events|=COMEDI_CB_ERROR|COMEDI_CB_EOA;
                pci9118_ai_cancel(dev,s);
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
 
@@ -634,7 +634,7 @@ static void interrupt_pci9118_ai_dma(comedi_device *dev,comedi_subdevice *s,
                        interrupt_pci9118_ai_mode4_switch(dev);
        }
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 /*
index 29b2e600ec3769e842b94a8010ead6e0c2a2b486..0f7d23a97c333c93b759dad7bf7d6add6a2efb77 100644 (file)
@@ -567,14 +567,14 @@ static void interrupt_pci1710_every_sample(void *d)
                rt_printk("comedi%d: A/D FIFO empty (%4x)\n", dev->minor, m);
                pci171x_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
        if (m & Status_FF) {
                rt_printk("comedi%d: A/D FIFO Full status (Fatal Error!) (%4x)\n", dev->minor, m);
                pci171x_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
 
@@ -590,7 +590,7 @@ static void interrupt_pci1710_every_sample(void *d)
                                rt_printk("comedi: A/D data dropout: received data from channel %d, expected %d!\n",(sampl & 0xf000)>>12,(devpriv->act_chanlist[s->async->cur_chan] & 0xf000)>>12);
                                pci171x_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                               comedi_event(dev,s,s->async->events);
+                               comedi_event(dev, s);
                                return;
                        }
                DPRINTK("%8d %2d %8d~",s->async->buf_int_ptr,s->async->cur_chan,s->async->buf_int_count);
@@ -611,7 +611,7 @@ static void interrupt_pci1710_every_sample(void *d)
                        if ((!devpriv->neverending_ai)&&(devpriv->ai_act_scan>=devpriv->ai_scans)) { // all data sampled
                                pci171x_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA;
-                               comedi_event(dev,s,s->async->events);
+                               comedi_event(dev, s);
                                return;
                        }
                }
@@ -620,7 +620,7 @@ static void interrupt_pci1710_every_sample(void *d)
        outb(0, dev->iobase + PCI171x_CLRINT);                  // clear our INT request
        DPRINTK("adv_pci1710 EDBG: END: interrupt_pci1710_every_sample(...)\n");
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 /*
@@ -643,7 +643,7 @@ static int move_block_from_fifo(comedi_device *dev,comedi_subdevice *s, int n, i
                                         dev->minor, (sampl & 0xf000)>>12,(devpriv->act_chanlist[j] & 0xf000)>>12, i, j, devpriv->ai_act_scan, n, turn, sampl);
                                pci171x_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                               comedi_event(dev,s,s->async->events);
+                               comedi_event(dev, s);
                                return 1;
                        }
                comedi_buf_put( s->async, sampl & 0x0fff );
@@ -675,14 +675,14 @@ static void interrupt_pci1710_half_fifo(void *d)
                rt_printk("comedi%d: A/D FIFO not half full! (%4x)\n", dev->minor, m);
                pci171x_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
        if (m & Status_FF) {
                rt_printk("comedi%d: A/D FIFO Full status (Fatal Error!) (%4x)\n", dev->minor, m);
                pci171x_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return;
        }
 
@@ -703,13 +703,13 @@ static void interrupt_pci1710_half_fifo(void *d)
                if ( devpriv->ai_act_scan>=devpriv->ai_scans ) { /* all data sampled */
                        pci171x_ai_cancel(dev,s);
                        s->async->events |= COMEDI_CB_EOA;
-                       comedi_event(dev,s,s->async->events);
+                       comedi_event(dev, s);
                        return;
                }
        outb(0, dev->iobase + PCI171x_CLRINT);                  // clear our INT request
        DPRINTK("adv_pci1710 EDBG: END: interrupt_pci1710_half_fifo(...)\n");
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 /*
index bd1f046d20b4be73b36b4ff903a1fbfe121c65c8..2560bcfa5e27b8c6a2277f7959f49ceebcc75faa 100644 (file)
@@ -631,7 +631,7 @@ dio200_inttrig_start_intr(comedi_device *dev, comedi_subdevice *s,
        comedi_spin_unlock_irqrestore(&subpriv->spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 1;
@@ -741,7 +741,7 @@ dio200_handle_read_intr(comedi_device *dev, comedi_subdevice *s)
        comedi_spin_unlock_irqrestore(&subpriv->spinlock, flags);
 
        if (oldevents != s->async->events) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return (triggered != 0);
@@ -899,7 +899,7 @@ dio200_subdev_intr_cmd(comedi_device *dev, comedi_subdevice *s)
        comedi_spin_unlock_irqrestore(&subpriv->spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 0;
index f76edb6515c3c2d4754e45d070b6cecbaac36c53..fce474b3f4ddbd350d000088f7f328b4e6434f04 100644 (file)
@@ -561,7 +561,7 @@ static irqreturn_t pc236_interrupt(int irq,void *d PT_REGS_ARG)
        if (handled) {
                comedi_buf_put(s->async,0);
                s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
        }
        return IRQ_RETVAL(handled);
 }
index 62d9c6529ef0285038dfdd62675b67e5ff34f1d4..68b93cd20ecf6395342b5a6c515855d65d9002a2 100644 (file)
@@ -575,7 +575,7 @@ pci224_ao_start(comedi_device *dev, comedi_subdevice *s)
                /* An empty acquisition! */
                pci224_ao_stop(dev, s);
                s->async->events |= COMEDI_CB_EOA;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        } else {
                /* Enable interrupts. */
                comedi_spin_lock_irqsave(&devpriv->ao_spinlock, flags);
@@ -714,7 +714,7 @@ pci224_ao_handle_fifo(comedi_device *dev, comedi_subdevice *s)
                }
        }
        if (s->async->events) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 }
 
index c5f395f93f781f344ebeb34f283c8dd8081ddb8e..dd79824b3032b0bf188927f301c16234dd21d847 100644 (file)
@@ -1461,7 +1461,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
                s = dev->write_subdev;
                s->async->events = 0;
                pci230_handle_ao(dev, s);
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                s->async->events = 0;
        }
 
@@ -1469,7 +1469,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
                s = dev->read_subdev;
                s->async->events = 0;
                pci230_handle_ai(dev, s);
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                s->async->events = 0;
        }
 
index 4db26d62a53e37c101f57dfd31fd7feb029251fd..1e7360a9ea74cae41c038ed159e10f184363bf4b 100644 (file)
@@ -1604,7 +1604,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG)
                async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
        }
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
 
        return IRQ_HANDLED;
 }
@@ -1661,7 +1661,7 @@ static void handle_ao_interrupt(comedi_device *dev, unsigned int status)
                comedi_spin_unlock_irqrestore( &dev->spinlock, flags );
        }
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
 }
 
 // cancel analog input command
index d0f7abf22e4e718f8efd20c4f79dfa16e9167231..38ae2333c3d8066e1b404158b773f37b064dc24a 100644 (file)
@@ -111,7 +111,7 @@ unsigned int cfc_handle_events( comedi_device *dev, comedi_subdevice *subd )
        if( events & ( COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW ) )
                subd->cancel( dev, subd );
 
-       comedi_event( dev, subd, events );
+       comedi_event(dev, subd);
 
        return events;
 }
index 6ea3c8c0c22791289b19a6b36f1c36c9e2eb4cf7..cfaba060f8c673e3b13043ea7719234176554e2e 100644 (file)
@@ -277,7 +277,7 @@ static irqreturn_t parport_interrupt(int irq,void *d PT_REGS_ARG)
        comedi_buf_put( s->async, 0 );
        s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 37f8a6c894fbb0285d2526a1952addd032c84682..b9a3e9df4eca2b38f629db7df3b180ac32d8bf16 100644 (file)
@@ -178,7 +178,7 @@ static void waveform_ai_interrupt(unsigned long arg)
        else
                del_timer(&devpriv->timer);
 
-       comedi_event(dev, dev->read_subdev, async->events);
+       comedi_event(dev, dev->read_subdev);
 }
 
 static int waveform_attach(comedi_device *dev,comedi_devconfig *it)
index de878967c204ffc0c723e6125ee32fb40e4971d1..65a9c94e0d4093cd5799b50e699ee3fcfc0b186d 100644 (file)
@@ -568,7 +568,7 @@ static void das16m1_handler(comedi_device *dev, unsigned int status)
                comedi_error(dev, "fifo overflow");
        }
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
 
 }
 
index 721438c18afe046781d9900abee8ae2880387cee..f33036e003f1180d594ef3283b4126265d3a6555 100644 (file)
@@ -947,7 +947,7 @@ static void das1800_ai_handler(comedi_device *dev)
                comedi_error(dev, "DAS1800 FIFO overflow");
                das1800_cancel(dev, s);
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-               comedi_event(dev, s, async->events);
+               comedi_event(dev, s);
                return;
        }
 
@@ -970,7 +970,7 @@ static void das1800_ai_handler(comedi_device *dev)
                async->events |= COMEDI_CB_EOA;
        }
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
 
        return;
 }
index 9e7730eba07b5e712819e7d215c418b454691f4e..63274c7d0788ffd146296e079d4d78bb8078bc6a 100644 (file)
@@ -176,12 +176,12 @@ static irqreturn_t intr_handler(int irq,void *d PT_REGS_ARG)
                printk("das6402: Got %i samples\n\n",devpriv->das6402_wordsread-diff);
 #endif
                s->async->events |= COMEDI_CB_EOA;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
        }
 
        outb(0x01,dev->iobase+8);   /* clear only the interrupt flip-flop */
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index e34411f80c40b99b41efead7c42d390cb7f81fc1..aca1e28eda7c54e135a96241da53703d6c044475 100644 (file)
@@ -428,7 +428,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
                comedi_error(dev, "DAS800 FIFO overflow");
                das800_cancel(dev, dev->subdevices + 0);
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-               comedi_event(dev, s, async->events);
+               comedi_event(dev, s);
                async->events = 0;
                return IRQ_HANDLED;
        }
@@ -446,7 +446,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
                disable_das800(dev);            /* diable hardware triggered conversions */
                async->events |= COMEDI_CB_EOA;
        }
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
        async->events = 0;
        return IRQ_HANDLED;
 }
index 1a2c465974da05dfbb5ae50971fb91116307b345..c2b59fe0297dc86038303ccd7683e7e625dfa019 100644 (file)
@@ -825,7 +825,7 @@ static int dmm32at_ai_cmd(comedi_device *dev, comedi_subdevice *s)
 /*             comedi_buf_put(s->async,i*100); */
 
 /*     s->async->events |= COMEDI_CB_EOA; */
-/*     comedi_event(dev,s,s->async->events); */
+/*     comedi_event(dev, s); */
 
        return 0;
 
@@ -870,7 +870,7 @@ static irqreturn_t dmm32at_isr(int irq,void *d PT_REGS_ARG){
 
                }
                /* flush the buffer */
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
        }
 
        /* reset the interrupt */
index 64628975288374ddfc29963d9adf248028411b51..de084730aac27f1b0aa28e9ee0e71a1bfcea0bae 100644 (file)
@@ -360,7 +360,7 @@ static irqreturn_t dt2814_interrupt(int irq,void *d PT_REGS_ARG)
 
                s->async->events |= COMEDI_CB_EOA;
        }
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index bd58dcc002fe20df3c7dcd63f362149608970e8e..ef901324b51bd47ac21f68b6c61c7252a7bd7889 100644 (file)
@@ -639,7 +639,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d PT_REGS_ARG)
                handled = 1;
        }
 #endif
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        /* printk("adcsr=0x%02x dacsr-0x%02x supcsr=0x%02x\n", adcsr, dacsr, supcsr); */
        return IRQ_RETVAL(handled);
 }
index 0cfd0d714471f5873da8be476229fad9809f7f02..4001b0af21a9302a49f8b088c94509bb3f5b88b7 100644 (file)
@@ -357,7 +357,7 @@ static irqreturn_t dt3k_interrupt(int irq, void *d PT_REGS_ARG)
                s->async->events |= COMEDI_CB_EOA;
        }
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 3fedb93c5d00ac4089520861002b8bd44e08784e..7373a24f69c1a98455c54bbe4182cf63abe94ba5 100644 (file)
@@ -1802,7 +1802,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG){
     ISR_PDEBUG("me4000_ai_isr(): Events = 0x%X\n", s->async->events);
 
     if(s->async->events)
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
 
     return IRQ_HANDLED;
 }
index a6902b412314d5718f0b72658650d9a14588783a..a52f8e6991ed054861d7623bdc73ea91e5e2eec9 100644 (file)
@@ -211,7 +211,7 @@ static irqreturn_t ni6527_interrupt(int irq, void *d PT_REGS_ARG)
 
        comedi_buf_put(s->async, 0);
        s->async->events |= COMEDI_CB_EOS;
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 3a6171cc1c9d627dcd0221240975b649a948bba4..59bc6e494d29f6d69419d9a434bcd637554f6a31 100644 (file)
@@ -464,7 +464,7 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d PT_REGS_ARG)
 
        comedi_buf_put(s->async, 0);
        s->async->events |= COMEDI_CB_EOS;
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 2235d049667a0c477ed9fcf5f31ba08fe964dcc6..475dcc0cecf82f870798fa8f205cadc46f65b213 100644 (file)
@@ -245,7 +245,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
                comedi_error(dev, "caught non-dma interrupt?  Aborting.");
                a2150_cancel(dev, s);
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-               comedi_event(dev, s, async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
        }
 
@@ -313,7 +313,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
 
        async->events |= COMEDI_CB_BLOCK;
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
 
        /* clear interrupt */
        outw(0x00, dev->iobase + DMA_TC_CLEAR_REG);
index 642d9287c662b634766c399e30a92ad95eeef9b4..3ec1bc04acae0ab5ed19a050c44d320c9ef51c25 100644 (file)
@@ -263,7 +263,7 @@ static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG)
 
        comedi_buf_put( s->async, inw(dev->iobase+AD_FIFO_REG) );
 
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 2cef71b952bf00b858749fe0fc32c52c56251c8d..625c7ad885bfd84913b65c01e078544229a07dce 100644 (file)
@@ -1351,7 +1351,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
                // clear error interrupt
                devpriv->write_byte(0x1, dev->iobase + ADC_CLEAR_REG);
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-               comedi_event(dev, s, async->events);
+               comedi_event(dev, s);
                comedi_error(dev, "overrun");
                return IRQ_HANDLED;
        }
@@ -1378,7 +1378,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
                // clear error interrupt
                devpriv->write_byte(0x1, dev->iobase + ADC_CLEAR_REG);
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-               comedi_event(dev, s, async->events);
+               comedi_event(dev, s);
                comedi_error(dev, "overflow");
                return IRQ_HANDLED;
        }
@@ -1404,7 +1404,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
                }
        }
 
-       comedi_event(dev, s, async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 0e002c0a6ccfa6e93d20994ad2c137829238d926..f93fbe4fbefd7669e5a52888674ebb795dc9a476 100644 (file)
@@ -787,9 +787,9 @@ static void shutdown_ai_command( comedi_device *dev )
        s->async->events |= COMEDI_CB_EOA;
 }
 
-static void ni_event(comedi_device *dev, comedi_subdevice *s, unsigned events)
+static void ni_event(comedi_device *dev, comedi_subdevice *s)
 {
-       if(events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW | COMEDI_CB_EOA))
+       if(s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW | COMEDI_CB_EOA))
        {
                switch(dev->subdevices - s)
                {
@@ -807,7 +807,7 @@ static void ni_event(comedi_device *dev, comedi_subdevice *s, unsigned events)
                        break;
                }
        }
-       comedi_event(dev, s, events);
+       comedi_event(dev, s);
 }
 
 static void handle_gpct_interrupt(comedi_device *dev, unsigned short counter_index)
@@ -816,7 +816,7 @@ static void handle_gpct_interrupt(comedi_device *dev, unsigned short counter_ind
 
        ni_tio_handle_interrupt(&devpriv->counter_dev->counters[counter_index], s);
        if(s->async->events)
-               ni_event(dev, s, s->async->events);
+               ni_event(dev, s);
 }
 
 static void ack_a_interrupt(comedi_device *dev, unsigned short a_status)
@@ -877,7 +877,7 @@ static void handle_a_interrupt(comedi_device *dev, unsigned short status,
                         * so it's a good idea to be careful. */
                        if(comedi_get_subdevice_runflags(s) & SRF_RUNNING){
                                s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
-                               ni_event(dev, s, s->async->events);
+                               ni_event(dev, s);
                        }
                        return;
                }
@@ -892,7 +892,7 @@ static void handle_a_interrupt(comedi_device *dev, unsigned short status,
                        if(status & (AI_Overrun_St | AI_Overflow_St))
                                s->async->events |= COMEDI_CB_OVERFLOW;
 
-                       ni_event(dev, s, s->async->events);
+                       ni_event(dev, s);
 
                        return;
                }
@@ -924,7 +924,7 @@ static void handle_a_interrupt(comedi_device *dev, unsigned short status,
                ni_handle_eos(dev, s);
        }
 
-       ni_event(dev,s,s->async->events);
+       ni_event(dev, s);
 
 #ifdef DEBUG_INTERRUPT
        status=devpriv->stc_readw(dev, AI_Status_1_Register);
@@ -1017,7 +1017,7 @@ static void handle_b_interrupt(comedi_device *dev, unsigned short b_status,
        }
 #endif
 
-       ni_event(dev,s,s->async->events);
+       ni_event(dev, s);
 }
 
 #ifdef DEBUG_STATUS_A
index 6721b00088d95b024a4fd3223042668798a9161d..ba79dc35673ab91e5769e37340f017276bfe26b6 100644 (file)
@@ -468,13 +468,13 @@ static int nidio96_8255_cb(int dir,int port,int data,unsigned long iobase)
        }
 }
 
-void ni_pcidio_event(comedi_device *dev, comedi_subdevice *s, unsigned events)
+void ni_pcidio_event(comedi_device *dev, comedi_subdevice *s)
 {
-       if(events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW))
+       if(s->async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW))
        {
                ni_pcidio_cancel(dev, s);
        }
-       comedi_event(dev, s, events);
+       comedi_event(dev, s);
 }
 
 static irqreturn_t nidio_interrupt(int irq, void *d PT_REGS_ARG)
@@ -604,7 +604,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d PT_REGS_ARG)
        }
 
 out:
-       ni_pcidio_event(dev, s, async->events);
+       ni_pcidio_event(dev, s);
 #if 0
        if(!tag){
                writeb(0x03,devpriv->mite->daq_io_addr+Master_DMA_And_Interrupt_Control);
index 70c0961a38b3c8b2e9899935260dd87171a02e5d..9aa776e7387d001f62d7a7b0242d845ebb118c3f 100644 (file)
@@ -201,7 +201,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d PT_REGS_ARG)
 
                s->async->events |= COMEDI_CB_EOA;
        }
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index d0e847bc5221a53845357eb9f58c1d6c758f87ca..77562555046ab4b88284dce2699ccec7bdfcb62e 100644 (file)
@@ -880,7 +880,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
                rt_printk("comedi%d: pcl812: (%s at 0x%lx) A/D cmd IRQ without DRDY!\n", dev->minor, dev->board_name, dev->iobase);
                pcl812_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA|COMEDI_CB_ERROR;
-               comedi_event(dev,s,s->async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
        }
 
@@ -898,7 +898,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
                        }
        }
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
@@ -925,7 +925,7 @@ static void transfer_from_dma_buf(comedi_device *dev,comedi_subdevice *s,
                }
        }
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 /*
index ad23dab50834a3364a2a13102f457fd9c6ea1d85..0324b05e59e979e3b0090db31c1c13d4a28d8ce8 100644 (file)
@@ -302,7 +302,7 @@ interrupt_pcl816_ai_mode13_int (int irq, void *d)
                comedi_error (dev, "A/D mode1/3 IRQ without DRDY!");
                pcl816_ai_cancel (dev, s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
 
   }
@@ -332,7 +332,7 @@ interrupt_pcl816_ai_mode13_int (int irq, void *d)
                pcl816_ai_cancel (dev, s);
                s->async->events |= COMEDI_CB_EOA;
        }
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
@@ -366,7 +366,7 @@ static void transfer_from_dma_buf(comedi_device *dev,comedi_subdevice *s,
                        }
        }
 
-       comedi_event(dev,s,s->async->events);
+       comedi_event(dev, s);
 }
 
 
index c137bfd629f6667a19f9611867d296242b6eb34e..8bc2475a4c264399cfd002e6c783e52e7c3cfca4 100644 (file)
@@ -514,7 +514,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
        comedi_error(dev,"A/D mode1/3 IRQ without DRDY!");
        pcl818_ai_cancel(dev,s);
        s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 
 conv_finish:
@@ -527,7 +527,7 @@ conv_finish:
                rt_printk("comedi: A/D mode1/3 IRQ - channel dropout %x!=%x !\n",(low & 0xf),devpriv->act_chanlist[devpriv->act_chanlist_pos]);
                pcl818_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
        }
        if (s->async->cur_chan == 0) {
@@ -541,7 +541,7 @@ conv_finish:
                        s->async->events |= COMEDI_CB_EOA;
                }
        }
-       comedi_event(dev, s, s->async->events);
+       comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
@@ -582,7 +582,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
                        rt_printk("comedi: A/D mode1/3 DMA - channel dropout %d(card)!=%d(chanlist) at %d !\n",(ptr[bufptr] & 0xf),devpriv->act_chanlist[devpriv->act_chanlist_pos], devpriv->act_chanlist_pos);
                        pcl818_ai_cancel(dev,s);
                        s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                       comedi_event(dev, s, s->async->events);
+                       comedi_event(dev, s);
                        return IRQ_HANDLED;
                }
 
@@ -598,13 +598,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
                        if ( devpriv->ai_act_scan == 0 ) { /* all data sampled */
                                pcl818_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA;
-                               comedi_event(dev, s, s->async->events);
+                               comedi_event(dev, s);
                                // printk("done int ai13 dma\n");
                                return IRQ_HANDLED;
                        }
        }
 
-       if (len>0) comedi_event(dev, s, s->async->events);
+       if (len>0) comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
@@ -650,7 +650,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
                        //rt_printk("I %d dmabuf[i] %d %d\n",i,dmabuf[i],devpriv->dmasamplsize);
                        pcl818_ai_cancel(dev,s);
                        s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                       comedi_event(dev, s, s->async->events);
+                       comedi_event(dev, s);
                        return IRQ_HANDLED;
                }
                //rt_printk("r %ld ",ofs_dats);
@@ -662,7 +662,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
                                rt_printk("comedi: A/D mode1/3 DMA - channel dropout %d!=%d !\n",(dmabuf[bufptr] & 0xf),devpriv->act_chanlist[devpriv->act_chanlist_pos]);
                                pcl818_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                               comedi_event(dev, s, s->async->events);
+                               comedi_event(dev, s);
                                return IRQ_HANDLED;
                        }
 
@@ -677,7 +677,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
                                if ( devpriv->ai_act_scan == 0 ) { /* all data sampled */
                                        pcl818_ai_cancel(dev,s);
                                        s->async->events |= COMEDI_CB_EOA;
-                                       comedi_event(dev, s, s->async->events);
+                                       comedi_event(dev, s);
                                        //printk("done int ai13 dma\n");
                                        return IRQ_HANDLED;
                                }
@@ -687,7 +687,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
                bufptr--;
                bufptr&=(devpriv->dmasamplsize-1);
                dmabuf[bufptr]=MAGIC_DMA_WORD;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                //outb(0,0x378);
                return IRQ_HANDLED;
        }
@@ -715,7 +715,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
                comedi_error(dev,"A/D mode1/3 FIFO overflow!");
                pcl818_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
        }
 
@@ -723,7 +723,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
                comedi_error(dev,"A/D mode1/3 FIFO interrupt without data!");
                pcl818_ai_cancel(dev,s);
                s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
                return IRQ_HANDLED;
        }
 
@@ -736,7 +736,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
                        rt_printk("comedi: A/D mode1/3 FIFO - channel dropout %d!=%d !\n",(lo & 0xf),devpriv->act_chanlist[devpriv->act_chanlist_pos]);
                        pcl818_ai_cancel(dev,s);
                        s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
-                       comedi_event(dev, s, s->async->events);
+                       comedi_event(dev, s);
                        return IRQ_HANDLED;
                }
 
@@ -750,12 +750,12 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
                        if ( devpriv->ai_act_scan == 0 ) { /* all data sampled */
                                pcl818_ai_cancel(dev,s);
                                s->async->events |= COMEDI_CB_EOA;
-                               comedi_event(dev, s, s->async->events);
+                               comedi_event(dev, s);
                                return IRQ_HANDLED;
                        }
        }
 
-       if (len>0) comedi_event(dev, s, s->async->events);
+       if (len>0) comedi_event(dev, s);
        return IRQ_HANDLED;
 }
 
index 58d42cd712cfdad17b8bd9a0b020948009a954a8..1c867d60518816b95692eddb8259380f623bf826 100644 (file)
@@ -29,7 +29,7 @@ Status: works
 
 A driver for the relatively new PCM-MIO multifunction board from
 Winsystems.  This board is a PC-104 based I/O board.  It contains
-four subdevices: 
+four subdevices:
   subdevice 0 - 16 channels of 16-bit AI
   subdevice 1 - 8 channels of 16-bit AO
   subdevice 2 - first 24 channels of the 48 channel of DIO (with edge-triggered interrupt support)
@@ -37,12 +37,12 @@ four subdevices:
 
   Some notes:
 
-  Synchronous reads and writes are the only things implemented for AI and AO, 
+  Synchronous reads and writes are the only things implemented for AI and AO,
   even though the hardware itself can do streaming acquisition, etc.  Anyone
   want to add asynchronous I/O for AI/AO as a feature?  Be my guest...
 
-  Asynchronous I/O for the DIO subdevices *is* implemented, however!  They are 
-  basically edge-triggered interrupts for any configuration of the first 
+  Asynchronous I/O for the DIO subdevices *is* implemented, however!  They are
+  basically edge-triggered interrupts for any configuration of the first
   24 DIO-lines.
 
   Also note that this interrupt support is untested.
@@ -50,24 +50,24 @@ four subdevices:
   A few words about edge-detection IRQ support (commands on DIO):
 
   * To use edge-detection IRQ support for the DIO subdevice, pass the IRQ
-    of the board to the comedi_config command.  The board IRQ is not jumpered 
+    of the board to the comedi_config command.  The board IRQ is not jumpered
     but rather configured through software, so any IRQ from 1-15 is OK.
-  
-  * Due to the genericity of the comedi API, you need to create a special 
+
+  * Due to the genericity of the comedi API, you need to create a special
     comedi_command in order to use edge-triggered interrupts for DIO.
-  
-  * Use comedi_commands with TRIG_NOW.  Your callback will be called each 
+
+  * Use comedi_commands with TRIG_NOW.  Your callback will be called each
     time an edge is detected on the specified DIO line(s), and the data
     values will be two sample_t's, which should be concatenated to form
     one 32-bit unsigned int.  This value is the mask of channels that had
     edges detected from your channel list.  Note that the bits positions
     in the mask correspond to positions in your chanlist when you
     specified the command and *not* channel id's!
-  
- *  To set the polarity of the edge-detection interrupts pass a nonzero value 
-    for either CR_RANGE or CR_AREF for edge-up polarity, or a zero 
+
+ *  To set the polarity of the edge-detection interrupts pass a nonzero value
+    for either CR_RANGE or CR_AREF for edge-up polarity, or a zero
     value for both CR_RANGE and CR_AREF if you want edge-down polarity.
-  
+
 
 Configuration Options:
   [0] - I/O port base address
@@ -104,7 +104,7 @@ Configuration Options:
   --------------------------------------------------------------
   REG_PORTx         All          R/W         Read/Write/Configure IO
   REG_INT_PENDING   All          ReadOnly    Quickly see which INT_IDx has int.
-  REG_PAGELOCK      All          WriteOnly   Select a page 
+  REG_PAGELOCK      All          WriteOnly   Select a page
   REG_POLx          Pg. 1 only   WriteOnly   Select edge-detection polarity
   REG_ENABx         Pg. 2 only   WriteOnly   Enable/Disable edge-detect. int.
   REG_INT_IDx       Pg. 3 only   R/W         See which ports/bits have ints.
@@ -119,10 +119,10 @@ Configuration Options:
 #define REG_PAGELOCK 0x7 /* page selector register, upper 2 bits select a page
                             and bits 0-5 are used to 'lock down' a particular
                             port above to make it readonly.  */
-#define REG_POL0 0x8 
+#define REG_POL0 0x8
 #define REG_POL1 0x9
 #define REG_POL2 0xA
-#define REG_ENAB0 0x8 
+#define REG_ENAB0 0x8
 #define REG_ENAB1 0x9
 #define REG_ENAB2 0xA
 #define REG_INT_ID0 0x8
@@ -171,13 +171,13 @@ static const comedi_lrange ranges_ai =
 static const comedi_lrange ranges_ao =
 { 6, { RANGE(0.,5.), RANGE(0.,10.) , RANGE(-5.,5.), RANGE(-10.,10.), RANGE(-2.5, 2.5), RANGE(-2.5, 7.5) } };
 
-static const pcmmio_board pcmmio_boards[] = 
+static const pcmmio_board pcmmio_boards[] =
 {
        {
                name:              "pcmmio",
                dio_num_asics:     1,
                dio_num_ports:     6,
-               total_iosize:      32, 
+               total_iosize:      32,
                ai_bits:           16,
                ao_bits:           16,
                n_ai_chans:        16,
@@ -196,23 +196,23 @@ static const pcmmio_board pcmmio_boards[] =
 #define thisboard ((const pcmmio_board *)dev->board_ptr)
 
 /* this structure is for data unique to this subdevice.  */
-typedef struct 
+typedef struct
 {
-  
+
   union {
     /* for DIO: mapping of halfwords (bytes) in port/chanarray to iobase */
     unsigned long iobases[PORTS_PER_SUBDEV];
-    
+
     /* for AI/AO */
     unsigned long iobase;
   };
   union {
     struct {
-      
+
       /* The below is only used for intr subdevices */
       struct {
         int asic; /* if non-negative, this subdev has an interrupt asic */
-        int first_chan; /* if nonnegative, the first channel id for 
+        int first_chan; /* if nonnegative, the first channel id for
                            interrupts. */
         int num_asic_chans; /* the number of asic channels in this subdev
                                that have interrutps */
@@ -236,9 +236,9 @@ typedef struct
    several hardware drivers keep similar information in this structure,
    feel free to suggest moving the variable to the comedi_device struct.  */
 typedef struct
-{  
+{
   /* stuff for DIO */
-  struct 
+  struct
   {
     unsigned char pagelock; /* current page and lock*/
     unsigned char pol [NUM_PAGED_REGS]; /* shadow of POLx registers */
@@ -247,7 +247,7 @@ typedef struct
     unsigned long iobase;
     unsigned int irq;
     spinlock_t spinlock;
-  } asics[MAX_ASICS];  
+  } asics[MAX_ASICS];
   pcmmio_subdev_private *sprivs;
 } pcmmio_private;
 
@@ -266,7 +266,7 @@ typedef struct
 static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it);
 static int pcmmio_detach(comedi_device *dev);
 
-static comedi_driver driver = 
+static comedi_driver driver =
 {
        driver_name:    "pcmmio",
        module:         THIS_MODULE,
@@ -329,16 +329,16 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
     irq[0] = it->options[1];
 
     printk("comedi%d: %s: io: %lx ", dev->minor, driver.driver_name, iobase);
-       
+
     dev->iobase = iobase;
-    
-    if ( !iobase || !request_region(iobase, 
-                                    thisboard->total_iosize, 
+
+    if ( !iobase || !request_region(iobase,
+                                    thisboard->total_iosize,
                                     driver.driver_name) ) {
       printk("I/O port conflict\n");
       return -EIO;
     }
-        
+
 /*
  * Initialize dev->board_name.  Note that we can use the "thisboard"
  * macro now, since we just initialized it in the last line.
@@ -357,13 +357,13 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
     for (asic = 0; asic < MAX_ASICS; ++asic) {
       devpriv->asics[asic].num = asic;
       devpriv->asics[asic].iobase = dev->iobase + 16 + asic*ASIC_IOSIZE;
-      devpriv->asics[asic].irq = 0; /* this gets actually set at the end of 
-                                       this function when we 
+      devpriv->asics[asic].irq = 0; /* this gets actually set at the end of
+                                       this function when we
                                        comedi_request_irqs */
       spin_lock_init(&devpriv->asics[asic].spinlock);
     }
-    
-    chans_left = CHANS_PER_ASIC * thisboard->dio_num_asics;    
+
+    chans_left = CHANS_PER_ASIC * thisboard->dio_num_asics;
     n_dio_subdevs = CALC_N_DIO_SUBDEVS(chans_left);
     n_subdevs = n_dio_subdevs + 2;
     devpriv->sprivs = (pcmmio_subdev_private *)kmalloc(sizeof(pcmmio_subdev_private) * n_subdevs, GFP_KERNEL);
@@ -384,7 +384,7 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
     }
 
     memset(dev->subdevices, 0, sizeof(*dev->subdevices) * n_subdevs);
-    
+
     /* First, AI */
     sdev_no = 0;
     s = dev->subdevices + sdev_no;
@@ -418,17 +418,17 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
     outb(0, subpriv->iobase + 3);
     outb(0, subpriv->iobase+4 + 3);
 
-    ++sdev_no;    
+    ++sdev_no;
     port = 0;
-    asic = 0;    
+    asic = 0;
     for (; sdev_no < (int)dev->n_subdevices; ++sdev_no)
-    {      
+    {
       int byte_no;
 
       s = dev->subdevices + sdev_no;
       s->private = devpriv->sprivs + sdev_no;
       s->maxdata = 1;
-      s->range_table = &range_digital;      
+      s->range_table = &range_digital;
       s->subdev_flags = SDF_READABLE|SDF_WRITABLE;
       s->type = COMEDI_SUBD_DIO;
       s->insn_bits = pcmmio_dio_insn_bits;
@@ -439,10 +439,10 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
       subpriv->dio.intr.asic_chan = -1;
       subpriv->dio.intr.num_asic_chans = -1;
       subpriv->dio.intr.active = 0;
-      s->len_chanlist = 1; 
+      s->len_chanlist = 1;
 
-      /* save the ioport address for each 'port' of 8 channels in the 
-         subdevice */         
+      /* save the ioport address for each 'port' of 8 channels in the
+         subdevice */
       for (byte_no = 0; byte_no < PORTS_PER_SUBDEV; ++byte_no, ++port) {
           if (port >= PORTS_PER_ASIC) {
             port = 0;
@@ -463,7 +463,7 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
             s->cancel = pcmmio_cancel;
             s->do_cmd = pcmmio_cmd;
             s->do_cmdtest = pcmmio_cmdtest;
-            s->len_chanlist = subpriv->dio.intr.num_asic_chans; 
+            s->len_chanlist = subpriv->dio.intr.num_asic_chans;
           }
           thisasic_chanct += CHANS_PER_PORT;
       }
@@ -475,7 +475,7 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
         asic = 0; /* reset the asic to our first asic, to do intr subdevs */
         port = 0;
       }
-      
+
     }
 
     init_asics(dev); /* clear out all the registers, basically */
@@ -485,34 +485,34 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
         int i;
         /* unroll the allocated irqs.. */
         for (i = asic-1; i >= 0; --i) {
-          comedi_free_irq(irq[i], dev);          
+          comedi_free_irq(irq[i], dev);
           devpriv->asics[i].irq = irq[i] = 0;
         }
         irq[asic] = 0;
       }
       devpriv->asics[asic].irq = irq[asic];
     }
-    
-    dev->irq = irq[0]; /* grr.. wish comedi dev struct supported multiple 
+
+    dev->irq = irq[0]; /* grr.. wish comedi dev struct supported multiple
                           irqs.. */
 
     if (irq[0]) {
       printk("irq: %u ", irq[0]);
-      if (irq[1] && thisboard->dio_num_asics == 2) 
+      if (irq[1] && thisboard->dio_num_asics == 2)
         printk("second ASIC irq: %u ", irq[1]);
     } else {
       printk("(IRQ mode disabled) ");
     }
 
     printk("attached\n");
-    
+
     return 1;
 }
 
 
 /*
  * _detach is called to deconfigure a device.  It should deallocate
- * resources.  
+ * resources.
  * This function is also called when _attach() fails, so it should be
  * careful not to release resources that were not necessarily
  * allocated by _attach().  dev->private and dev->subdevices are
@@ -527,10 +527,10 @@ static int pcmmio_detach(comedi_device *dev)
       release_region(dev->iobase, thisboard->total_iosize);
 
     for (i = 0; i < MAX_ASICS; ++i) {
-      if (devpriv && devpriv->asics[i].irq) 
+      if (devpriv && devpriv->asics[i].irq)
         comedi_free_irq(devpriv->asics[i].irq, dev);
     }
-    
+
     if (devpriv && devpriv->sprivs)
       kfree(devpriv->sprivs);
 
@@ -550,9 +550,9 @@ static int pcmmio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
     if (insn->n != 2) return -EINVAL;
 
      /* NOTE:
-        reading a 0 means this channel was high 
+        reading a 0 means this channel was high
         writine a 0 sets the channel high
-        reading a 1 means this channel was low 
+        reading a 1 means this channel was low
         writing a 1 means set this channel low
 
         Therefore everything is always inverted. */
@@ -569,13 +569,13 @@ static int pcmmio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
 
     for (byte_no = 0; byte_no < s->n_chan/CHANS_PER_PORT; ++byte_no) {
            /* address of 8-bit port */
-        unsigned long ioaddr = subpriv->iobases[byte_no], 
+        unsigned long ioaddr = subpriv->iobases[byte_no],
            /* bit offset of port in 32-bit doubleword */
-            offset = byte_no * 8; 
+            offset = byte_no * 8;
                       /* this 8-bit port's data */
-        unsigned char byte = 0,   
+        unsigned char byte = 0,
                       /* The write mask for this port (if any) */
-                      write_mask_byte = (data[0] >> offset) & 0xff, 
+                      write_mask_byte = (data[0] >> offset) & 0xff,
                       /* The data byte for this port */
                       data_byte = (data[1] >> offset) & 0xff;
 
@@ -586,7 +586,7 @@ static int pcmmio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
         printk("byte %d wmb %02x db %02x offset %02d io %04x, data_in %02x ", byte_no, (unsigned)write_mask_byte, (unsigned)data_byte, offset, ioaddr, (unsigned)byte);
 #endif
 
-        if ( write_mask_byte ) { 
+        if ( write_mask_byte ) {
           /* this byte has some write_bits -- so set the output lines */
           byte &= ~write_mask_byte; /* clear bits for write mask */
           byte |= ~data_byte & write_mask_byte; /* set to inverted data_byte */
@@ -599,17 +599,17 @@ static int pcmmio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
         printk("data_out_byte %02x\n", (unsigned)byte);
 #endif
         /* save the digital input lines for this byte.. */
-        s->state |= ((unsigned int)byte) << offset; 
+        s->state |= ((unsigned int)byte) << offset;
     }
 
     /* now return the DIO lines to data[1] - note they came inverted! */
-    data[1] = ~s->state; 
+    data[1] = ~s->state;
 
 #ifdef DAMMIT_ITS_BROKEN
     /* DEBUG */
     printk("s->state %08x data_out %08x\n", s->state, data[1]);
 #endif
-    
+
     return 2;
 }
 
@@ -626,23 +626,23 @@ static int pcmmio_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
 
     /* Compute ioaddr for this channel */
     ioaddr = subpriv->iobases[byte_no];
-    
+
      /* NOTE:
-        writing a 0 an IO channel's bit sets the channel to INPUT 
+        writing a 0 an IO channel's bit sets the channel to INPUT
         and pulls the line high as well
-        
+
         writing a 1 to an IO channel's  bit pulls the line low
 
-        All channels are implicitly always in OUTPUT mode -- but when 
+        All channels are implicitly always in OUTPUT mode -- but when
         they are high they can be considered to be in INPUT mode..
 
-        Thus, we only force channels low if the config request was INPUT, 
+        Thus, we only force channels low if the config request was INPUT,
         otherwise we do nothing to the hardware.    */
 
        switch(data[0])
        {
        case INSN_CONFIG_DIO_OUTPUT:
-          /* save to io_bits -- don't actually do anything since 
+          /* save to io_bits -- don't actually do anything since
              all input channels are also output channels... */
           s->io_bits |= 1<<chan;
           break;
@@ -652,11 +652,11 @@ static int pcmmio_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
           byte = inb(ioaddr);
           byte &= ~(1<<bit_no); /**< set input channel to '0' */
 
-          /* write out byte -- this is the only time we actually affect the 
-             hardware as all channels are implicitly output -- but input 
+          /* write out byte -- this is the only time we actually affect the
+             hardware as all channels are implicitly output -- but input
              channels are set to float-high */
           outb(byte, ioaddr);
-          
+
           /* save to io_bits */
           s->io_bits &= ~(1<<chan);
           break;
@@ -670,16 +670,16 @@ static int pcmmio_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
        default:
           return -EINVAL;
           break;
-       }    
+       }
 
-       return insn->n;    
+       return insn->n;
 }
 
-static void init_asics(comedi_device *dev) /* sets up an 
+static void init_asics(comedi_device *dev) /* sets up an
                                               ASIC chip to defaults */
 {
   int asic;
-  
+
   for (asic = 0; asic < thisboard->dio_num_asics; ++asic)
   {
     int port, page;
@@ -688,7 +688,7 @@ static void init_asics(comedi_device *dev) /* sets up an
     switch_page(dev, asic,  0); /* switch back to page 0 */
 
     /* first, clear all the DIO port bits */
-    for (port = 0; port < PORTS_PER_ASIC; ++port) 
+    for (port = 0; port < PORTS_PER_ASIC; ++port)
       outb(0, baseaddr + REG_PORT0 + port);
 
     /* Next, clear all the paged registers for each page */
@@ -709,7 +709,7 @@ static void init_asics(comedi_device *dev) /* sets up an
     /* END DEBUG */
 
     switch_page(dev, asic,  0); /* switch back to default page 0 */
-    
+
   }
 }
 
@@ -723,7 +723,7 @@ static void switch_page(comedi_device *dev, int asic, int page)
   devpriv->asics[asic].pagelock |= page<<REG_PAGE_BITOFFSET;
 
   /* now write out the shadow register */
-  outb(devpriv->asics[asic].pagelock, 
+  outb(devpriv->asics[asic].pagelock,
        devpriv->asics[asic].iobase + REG_PAGELOCK);
 }
 
@@ -732,7 +732,7 @@ static void lock_port(comedi_device *dev, int asic, int port)
   if (asic < 0 || asic >= thisboard->dio_num_asics) return; /* paranoia */
   if (port < 0 || port >= PORTS_PER_ASIC) return; /* more paranoia */
 
-  devpriv->asics[asic].pagelock |= 0x1<<port;  
+  devpriv->asics[asic].pagelock |= 0x1<<port;
   /* now write out the shadow register */
   outb(devpriv->asics[asic].pagelock, devpriv->asics[asic].iobase + REG_PAGELOCK);
   return;
@@ -743,7 +743,7 @@ static void unlock_port(comedi_device *dev, int asic, int port)
 {
   if (asic < 0 || asic >= thisboard->dio_num_asics) return; /* paranoia */
   if (port < 0 || port >= PORTS_PER_ASIC) return; /* more paranoia */
-  devpriv->asics[asic].pagelock &= ~(0x1<<port) | REG_LOCK_MASK;  
+  devpriv->asics[asic].pagelock &= ~(0x1<<port) | REG_LOCK_MASK;
   /* now write out the shadow register */
   outb(devpriv->asics[asic].pagelock, devpriv->asics[asic].iobase + REG_PAGELOCK);
   (void)unlock_port(dev, asic, port); /* not reached, suppress compiler warnings*/
@@ -753,10 +753,10 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
 {
   int asic, got1 = 0;
   comedi_device *dev = (comedi_device *)d;
-  
+
   for (asic = 0; asic < MAX_ASICS; ++asic) {
     if (irq == devpriv->asics[asic].irq) {
-      unsigned long flags;    
+      unsigned long flags;
       unsigned triggered = 0;
       unsigned long iobase = devpriv->asics[asic].iobase;
       /* it is an interrupt for ASIC #asic */
@@ -773,8 +773,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
             unsigned char io_lines_with_edges = 0;
             switch_page(dev, asic, PAGE_INT_ID);
             io_lines_with_edges = inb(iobase + REG_INT_ID0 + port);
-           
-            if (io_lines_with_edges) 
+
+            if (io_lines_with_edges)
               /* clear pending interrupt */
               outb(0, iobase + REG_INT_ID0 + port);
 
@@ -787,7 +787,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
 
       comedi_spin_unlock_irqrestore(&devpriv->asics[asic].spinlock, flags);
 
-      if (triggered) {        
+      if (triggered) {
         comedi_subdevice *s;
         /* TODO here: dispatch io lines to subdevs with commands.. */
         printk("PCMMIO DEBUG: got edge detect interrupt %d asic %d which_chans: %06x\n", irq, asic, triggered);
@@ -795,9 +795,9 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
           if (subpriv->dio.intr.asic == asic) { /* this is an interrupt subdev, and it matches this asic! */
             unsigned long flags;
             unsigned oldevents;
-            
+
             comedi_spin_lock_irqsave(&subpriv->dio.intr.spinlock, flags);
-            
+
             oldevents = s->async->events;
 
             if (subpriv->dio.intr.active) {
@@ -805,7 +805,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
               if (mytrig & subpriv->dio.intr.enabled_mask) {
                 lsampl_t val = 0;
                 unsigned int n, ch, len;
-                
+
                 len = s->async->cmd.chanlist_len;
                 for (n = 0; n < len; n++) {
                   ch = CR_CHAN(s->async->cmd.chanlist[n]);
@@ -820,9 +820,9 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
                 } else {
                   /* Overflow! Stop acquisition!! */
                   /* TODO: STOP_ACQUISITION_CALL_HERE!! */
-                  pcmmio_stop_intr(dev, s); 
+                  pcmmio_stop_intr(dev, s);
                 }
-                
+
                 /* Check for end of acquisition. */
                 if (!subpriv->dio.intr.continuous) {
                   /* stop_src == TRIG_COUNT */
@@ -831,7 +831,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
                     if (subpriv->dio.intr.stop_count == 0) {
                       s->async->events |= COMEDI_CB_EOA;
                       /* TODO: STOP_ACQUISITION_CALL_HERE!! */
-                      pcmmio_stop_intr(dev, s); 
+                      pcmmio_stop_intr(dev, s);
                     }
                   }
                 }
@@ -839,13 +839,13 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
             }
 
             comedi_spin_unlock_irqrestore(&subpriv->dio.intr.spinlock, flags);
-            
+
             if (oldevents != s->async->events) {
-              comedi_event(dev, s, s->async->events);
+              comedi_event(dev, s);
             }
 
           }
-          
+
         }
       }
 
@@ -859,9 +859,9 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
 static void pcmmio_stop_intr(comedi_device *dev, comedi_subdevice *s)
 {
   int nports, firstport, asic, port;
-  
+
   if ( (asic = subpriv->dio.intr.asic) < 0 ) return; /* not an interrupt subdev */
-  
+
   subpriv->dio.intr.enabled_mask = 0;
   subpriv->dio.intr.active = 0;
   s->async->inttrig = 0;
@@ -884,9 +884,9 @@ static int pcmmio_start_intr(comedi_device *dev, comedi_subdevice *s)
   } else {
     unsigned bits = 0, pol_bits = 0, n;
     int nports, firstport, asic, port;
-    comedi_cmd *cmd = &s->async->cmd;  
-    
-    if ( (asic = subpriv->dio.intr.asic) < 0 ) return 1; /* not an interrupt 
+    comedi_cmd *cmd = &s->async->cmd;
+
+    if ( (asic = subpriv->dio.intr.asic) < 0 ) return 1; /* not an interrupt
                                                         subdev */
     subpriv->dio.intr.enabled_mask = 0;
     subpriv->dio.intr.active = 1;
@@ -895,7 +895,7 @@ static int pcmmio_start_intr(comedi_device *dev, comedi_subdevice *s)
     if (cmd->chanlist) {
       for (n = 0; n < cmd->chanlist_len; n++) {
         bits |= (1U << CR_CHAN(cmd->chanlist[n]));
-        pol_bits |= 
+        pol_bits |=
           (CR_AREF(cmd->chanlist[n]) || CR_RANGE(cmd->chanlist[n]) ? 1U : 0U)
             << CR_CHAN(cmd->chanlist[n]);
       }
@@ -908,14 +908,14 @@ static int pcmmio_start_intr(comedi_device *dev, comedi_subdevice *s)
       /* set resource enable register to enable IRQ operation */
       outb(1<<4, dev->iobase+3);
       /* set bits 0-3 of b to the irq number from 0-15 */
-      b = dev->irq & ((1<<4)-1); 
+      b = dev->irq & ((1<<4)-1);
       outb(b, dev->iobase+2);
       /* done, we told the board what irq to use */
     }
 
     switch_page(dev, asic, PAGE_ENAB);
     for (port = firstport; port < firstport+nports; ++port) {
-      unsigned enab = bits >> (subpriv->dio.intr.first_chan + (port-firstport)*8) & 0xff, 
+      unsigned enab = bits >> (subpriv->dio.intr.first_chan + (port-firstport)*8) & 0xff,
                pol = pol_bits >> (subpriv->dio.intr.first_chan + (port-firstport)*8) & 0xff ;
       /* set enab intrs for this subdev.. */
       outb(enab, devpriv->asics[asic].iobase + REG_ENAB0 + port);
@@ -934,7 +934,7 @@ static int  pcmmio_cancel(comedi_device *dev, comedi_subdevice *s)
   if (subpriv->dio.intr.active)  pcmmio_stop_intr(dev, s);
   comedi_spin_unlock_irqrestore(&subpriv->dio.intr.spinlock, flags);
 
-  return 0;  
+  return 0;
 }
 
 /*
@@ -956,7 +956,7 @@ pcmmio_inttrig_start_intr(comedi_device *dev, comedi_subdevice *s, unsigned int
        comedi_spin_unlock_irqrestore(&subpriv->dio.intr.spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 1;
@@ -1002,7 +1002,7 @@ pcmmio_cmd(comedi_device *dev, comedi_subdevice *s)
        comedi_spin_unlock_irqrestore(&subpriv->dio.intr.spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 0;
@@ -1033,7 +1033,7 @@ pcmmio_cmdtest(comedi_device *dev, comedi_subdevice *s,
        if (!cmd->convert_src || tmp != cmd->convert_src) err++;
 
        tmp = cmd->scan_end_src;
-       cmd->scan_end_src &= TRIG_COUNT;  
+       cmd->scan_end_src &= TRIG_COUNT;
        if (!cmd->scan_end_src || tmp != cmd->scan_end_src) err++;
 
        tmp = cmd->stop_src;
@@ -1115,8 +1115,8 @@ static int ai_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn,
 {
   int n;
   unsigned long iobase = subpriv->iobase;
-  
-  /* 
+
+  /*
   1. write the CMD byte (to BASE+2)
   2. read junk lo byte (BASE+0)
   3. read junk hi byte (BASE+1)
@@ -1124,41 +1124,41 @@ static int ai_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn,
   5. read valid lo byte(BASE+0)
   6. read valid hi byte(BASE+1)
 
-  Additionally note that the BASE += 4 if the channel >= 8 
+  Additionally note that the BASE += 4 if the channel >= 8
   */
-  
+
 
   /* convert n samples */
   for(n = 0; n < insn->n; n++) {
     unsigned chan = CR_CHAN(insn->chanspec), range = CR_RANGE(insn->chanspec), aref = CR_AREF(insn->chanspec);
     unsigned char command_byte = 0;
     unsigned iooffset = 0;
-    sampl_t sample, adc_adjust = 0;    
-    
+    sampl_t sample, adc_adjust = 0;
+
     if (chan > 7) chan -= 8, iooffset = 4; /* use the second dword for channels > 7 */
-    
+
     if (aref != AREF_DIFF) {
       aref = AREF_GROUND;
-      command_byte |= 1<<7; /* set bit 7 to indicate single-ended */      
+      command_byte |= 1<<7; /* set bit 7 to indicate single-ended */
     }
     if (range < 2) adc_adjust = 0x8000; /* bipolar ranges (-5,5 .. -10,10 need to be adjusted -- that is.. they need to wrap around by adding 0x8000 */
 
     if (chan % 2) {
       command_byte |= 1<<6; /* odd-numbered channels have bit 6 set */
     }
-    
+
     /* select the channel, bits 4-5 == chan/2 */
     command_byte |= ((chan/2) & 0x3)<<4;
 
-    
+
     /* set the range, bits 2-3 */
     command_byte |= (range & 0x3) << 2;
 
     /* need to do this twice to make sure mux settled */
     outb(command_byte, iobase + iooffset + 2);  /* chan/range/aref select */
-    
+
     adc_wait_ready(iobase + iooffset); /* wait for the adc to say it finised the conversion */
-    
+
     outb(command_byte, iobase + iooffset + 2);  /* select the chan/range/aref AGAIN */
 
     adc_wait_ready(iobase + iooffset);
@@ -1188,16 +1188,16 @@ static int wait_dac_ready(unsigned long iobase)
   unsigned long retry = 100000L;
 
   /* This may seem like an absurd way to handle waiting and violates the
-     "no busy waiting" policy. The fact is that the hardware is 
-     normally so fast that we usually only need one time through the loop 
-     anyway. The longer timeout is for rare occasions and for detecting 
+     "no busy waiting" policy. The fact is that the hardware is
+     normally so fast that we usually only need one time through the loop
+     anyway. The longer timeout is for rare occasions and for detecting
      non-existant hardware.  */
-  
+
   while(retry--)
   {
     if (inb(iobase+3) & 0x80)
         return 0;
-      
+
   }
   return 1;
 }
@@ -1206,30 +1206,30 @@ static int ao_winsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn,
 {
   int n;
   unsigned iobase = subpriv->iobase, iooffset = 0;
-  
+
   for(n = 0; n < insn->n; n++) {
     unsigned chan = CR_CHAN(insn->chanspec), range = CR_RANGE(insn->chanspec);
     if (chan < s->n_chan) {
       unsigned char command_byte = 0, range_byte = range&((1<<4)-1);
       if (chan >= 4) chan -=4, iooffset += 4;
       /* set the range.. */
-      outb(range_byte, iobase+iooffset+0); 
+      outb(range_byte, iobase+iooffset+0);
       outb(0, iobase+iooffset+1);
 
       /* tell it to begin */
       command_byte = (chan << 1) | 0x60;
       outb(command_byte, iobase+iooffset+2);
-      
+
       wait_dac_ready(iobase+iooffset);
 
       outb(data[n] & 0xff, iobase+iooffset+0); /* low order byte */
       outb((data[n]>>8) & 0xff, iobase+iooffset+1); /* high order byte */
       command_byte = 0x70 | (chan<<1); /* set bit 4 of command byte to indicate data is loaded and trigger conversion */
       /* trigger converion */
-      outb(command_byte, iobase+iooffset+2); 
+      outb(command_byte, iobase+iooffset+2);
 
       wait_dac_ready(iobase+iooffset);
-            
+
       subpriv->ao.shadow_samples[chan] = data[n]; /* save to shadow register for ao_rinsn */
     }
   }
index d36e6b8b7b5fbee23b7066e3af627fef747994d2..f2472688821fd5a378ed331997be632a24237ef0 100644 (file)
@@ -775,7 +775,7 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG)
             comedi_spin_unlock_irqrestore(&subpriv->intr.spinlock, flags);
 
             if (oldevents != s->async->events) {
-              comedi_event(dev, s, s->async->events);
+              comedi_event(dev, s);
             }
 
           }
@@ -880,7 +880,7 @@ pcmuio_inttrig_start_intr(comedi_device *dev, comedi_subdevice *s, unsigned int
        comedi_spin_unlock_irqrestore(&subpriv->intr.spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 1;
@@ -926,7 +926,7 @@ pcmuio_cmd(comedi_device *dev, comedi_subdevice *s)
        comedi_spin_unlock_irqrestore(&subpriv->intr.spinlock, flags);
 
        if (event) {
-               comedi_event(dev, s, s->async->events);
+               comedi_event(dev, s);
        }
 
        return 0;
index 8e3eb0373e1117c0fa3f8e2367f93161f081a6bb..393e506b867120ef25fec42236ceea53f425b4fc 100644 (file)
@@ -1541,7 +1541,7 @@ static irqreturn_t rtd_interrupt (
                DPRINTK("rtd520: Samples Done (DMA).\n");
                goto transferDone;
            }
-           comedi_event (dev, s, s->async->events);
+           comedi_event (dev, s);
        } else {
            /*DPRINTK ("rtd520: No DMA ready: istatus %x\n", istatus);*/
        }
@@ -1572,7 +1572,7 @@ static irqreturn_t rtd_interrupt (
                        (fifoStatus ^ 0x6666) & 0x7777); /* should be all 0s */
                goto transferDone;
            }
-           comedi_event (dev, s, s->async->events);
+           comedi_event (dev, s);
        } else if (devpriv->transCount > 0) {   /* read often */
            /*DPRINTK("rtd520: Sample int, reading %d  fifo_status 0x%x\n",
              devpriv->transCount, (fifoStatus ^ 0x6666) & 0x7777);*/
@@ -1587,7 +1587,7 @@ static irqreturn_t rtd_interrupt (
                            (fifoStatus ^ 0x6666) & 0x7777);
                    goto transferDone;
                }
-               comedi_event (dev, s, s->async->events);
+               comedi_event (dev, s);
            }
        } else {                        /* wait for 1/2 FIFO (old)*/
            DPRINTK("rtd520: Sample int.  Wait for 1/2. fifo_status 0x%x\n",
@@ -1644,7 +1644,7 @@ transferDone:
     }
 
     s->async->events |= COMEDI_CB_EOA;/* signal end to comedi */
-    comedi_event (dev, s, s->async->events);
+    comedi_event (dev, s);
 
                                        /* clear the interrupt */
     status = RtdInterruptStatus (dev);
index 69e4ed9f94e70803c634cc808a987c68f44e9144..b52f85439cfeb663f28bae21b966d55ec6e20329 100644 (file)
@@ -1026,7 +1026,7 @@ static irqreturn_t s626_irq_handler(int irq,void *d PT_REGS_ARG)
 
     // tell comedi that data is there
     DEBUG("s626_irq_handler: events %d\n",s->async->events);
-    comedi_event(dev, s, s->async->events);
+    comedi_event(dev, s);
     break;
   case IRQ_GPIO3: //check dio and conter interrupt
 
index 19c7cfe744cf56df1fc68da5178fe270a660de6a..c4888c5971369864f44caad428340734a9aed6d4 100644 (file)
@@ -452,8 +452,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG)
                        s->async->events |= COMEDI_CB_EOA;
                        s->async->events |= COMEDI_CB_ERROR;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        // stop the transfer w/o unlink
                        usbdux_ai_stop(this_usbduxsub,0);
                }
@@ -468,8 +467,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG)
                        s->async->events |= COMEDI_CB_EOA;
                        s->async->events |= COMEDI_CB_ERROR;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        // don't do an unlink here
                        usbdux_ai_stop(this_usbduxsub,0);
                }
@@ -500,8 +498,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG)
                s->async->events |= COMEDI_CB_EOA;
                s->async->events |= COMEDI_CB_ERROR;
                comedi_event(this_usbduxsub->comedidev,
-                            s,
-                            s->async->events);
+                            s);
                // don't do an unlink here
                usbdux_ai_stop(this_usbduxsub,0);
                return;
@@ -527,8 +524,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG)
                        // say comedi that the acquistion is over
                        s->async->events |= COMEDI_CB_EOA;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        return;
                }
        }
@@ -550,8 +546,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb PT_REGS_ARG)
        }
        // tell comedi that data is there
        comedi_event(this_usbduxsub->comedidev,
-                    s,
-                    s->async->events);
+                    s);
 }
 
 
@@ -697,8 +692,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb PT_REGS_ARG) {
                if (this_usbduxsub->ao_cmd_running) {
                        s->async->events |= COMEDI_CB_EOA;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        usbdux_ao_stop(this_usbduxsub,0);
                }
                return;
@@ -711,8 +705,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb PT_REGS_ARG) {
                        s->async->events |= COMEDI_CB_ERROR;
                        s->async->events |= COMEDI_CB_EOA;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        // we do an unlink if we are in the high speed mode
                        usbdux_ao_stop(this_usbduxsub,0);
                }
@@ -740,8 +733,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb PT_REGS_ARG) {
                                               0);
                                s->async->events |= COMEDI_CB_EOA;
                                comedi_event(this_usbduxsub->comedidev,
-                                            s,
-                                            s->async->events);
+                                            s);
                                // no resubmit of the urb
                                return;
                        }
@@ -773,8 +765,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb PT_REGS_ARG) {
                // transmit data to comedi
                s->async->events |= COMEDI_CB_BLOCK;
                comedi_event(this_usbduxsub->comedidev,
-                            s,
-                            s->async->events);
+                            s);
                }
        }
        urb->transfer_buffer_length = SIZEOUTBUF;
@@ -803,8 +794,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb PT_REGS_ARG) {
                        s->async->events |= COMEDI_CB_EOA;
                        s->async->events |= COMEDI_CB_ERROR;
                        comedi_event(this_usbduxsub->comedidev,
-                                    s,
-                                    s->async->events);
+                                    s);
                        // don't do an unlink here
                        usbdux_ao_stop(this_usbduxsub,0);
                }
index cef25c8ef4dbc5c2a3dbe49f785be242987a1afd..9e32b4c9ed3f0ed472b5673b9224a3c8417cc788 100644 (file)
@@ -216,7 +216,7 @@ static int send_dux_commands(usbduxfastsub_t* this_usbduxfastsub,int cmd_type) {
                                              CHANNELLISTEP),
                              this_usbduxfastsub->dux_commands,
                              SIZEOFDUXBUFFER,
-                             &nsent, 
+                             &nsent,
                              10000);
        if (result<0) {
                printk("comedi%d: could not transmit dux_commands to the usb-device, err=%d\n",
@@ -275,7 +275,7 @@ static int usbduxfast_ai_stop(usbduxfastsub_t* this_usbduxfastsub,
 #endif
 
 
-       this_usbduxfastsub->ai_cmd_running=0;           
+       this_usbduxfastsub->ai_cmd_running=0;
 
        if (do_unlink) {
                // stop aquistion
@@ -313,7 +313,7 @@ static int usbduxfast_ai_cancel(comedi_device *dev,
        // unlink
        res=usbduxfast_ai_stop(this_usbduxfastsub,1);
        up(&this_usbduxfastsub->sem);
-       
+
        return res;
 }
 
@@ -384,9 +384,8 @@ static void usbduxfastsub_ai_Irq(struct urb *urb PT_REGS_ARG)
                // tell this comedi
                s->async->events |= COMEDI_CB_EOA;
                s->async->events |= COMEDI_CB_ERROR;
-               comedi_event(this_usbduxfastsub->comedidev, 
-                            s,
-                            s->async->events);
+               comedi_event(this_usbduxfastsub->comedidev,
+                            s);
                // stop the transfer w/o unlink
                usbduxfast_ai_stop(this_usbduxfastsub,0);
                return;
@@ -397,9 +396,8 @@ static void usbduxfastsub_ai_Irq(struct urb *urb PT_REGS_ARG)
                       urb->status);
                s->async->events |= COMEDI_CB_EOA;
                s->async->events |= COMEDI_CB_ERROR;
-               comedi_event(this_usbduxfastsub->comedidev, 
-                            s, 
-                            s->async->events);
+               comedi_event(this_usbduxfastsub->comedidev,
+                            s);
                usbduxfast_ai_stop(this_usbduxfastsub,0);
                return;
        }
@@ -418,23 +416,21 @@ static void usbduxfastsub_ai_Irq(struct urb *urb PT_REGS_ARG)
                                                   0);
                                // say comedi that the acquistion is over
                                s->async->events |= COMEDI_CB_EOA;
-                               comedi_event(this_usbduxfastsub->comedidev, 
-                                            s, 
-                                            s->async->events);
+                               comedi_event(this_usbduxfastsub->comedidev,
+                                            s);
                                return;
                        }
                        this_usbduxfastsub->ai_sample_count-=n;
                }
-               
+
                // write the full buffer to comedi
                cfc_write_array_to_buffer(s,
                                          urb->transfer_buffer,
                                          urb->actual_length);
-               
+
                // tell comedi that data is there
-               comedi_event(this_usbduxfastsub->comedidev, 
-                            s,
-                            s->async->events);
+               comedi_event(this_usbduxfastsub->comedidev,
+                            s);
 
        } else {
                // ignore this packet
@@ -451,9 +447,8 @@ static void usbduxfastsub_ai_Irq(struct urb *urb PT_REGS_ARG)
                       err);
                s->async->events |= COMEDI_CB_EOA;
                s->async->events |= COMEDI_CB_ERROR;
-               comedi_event(this_usbduxfastsub->comedidev, 
-                            s,
-                            s->async->events);
+               comedi_event(this_usbduxfastsub->comedidev,
+                            s);
                usbduxfast_ai_stop(this_usbduxfastsub,0);
        }
 }
@@ -468,17 +463,17 @@ static int usbduxfastsub_start(usbduxfastsub_t* usbduxfastsub) {
 
        if (usbduxfastsub->probed) {
                // 7f92 to zero
-               local_transfer_buffer[0]=0; 
+               local_transfer_buffer[0]=0;
                errcode=USB_CONTROL_MSG
                        (usbduxfastsub->usbdev,
                         // create a pipe for a control transfer
                         usb_sndctrlpipe(usbduxfastsub->usbdev,0),
                         // bRequest, "Firmware"
-                        USBDUXFASTSUB_FIRMWARE, 
+                        USBDUXFASTSUB_FIRMWARE,
                         // bmRequestType
-                        VENDOR_DIR_OUT, 
+                        VENDOR_DIR_OUT,
                         // Value
-                        USBDUXFASTSUB_CPUCS, 
+                        USBDUXFASTSUB_CPUCS,
                         // Index
                         0x0000,
                         // address of the transfer buffer
@@ -486,7 +481,7 @@ static int usbduxfastsub_start(usbduxfastsub_t* usbduxfastsub) {
                         // Length
                         1,
                         // Timeout
-                        EZTIMEOUT 
+                        EZTIMEOUT
                         );
                if (errcode<0) {
                        printk("comedi_: usbduxfast_: control msg failed (start)\n");
@@ -505,23 +500,23 @@ static int usbduxfastsub_stop(usbduxfastsub_t* usbduxfastsub) {
        unsigned char local_transfer_buffer[16];
        if (usbduxfastsub->probed) {
                // 7f92 to one
-               local_transfer_buffer[0]=1; 
+               local_transfer_buffer[0]=1;
                errcode=USB_CONTROL_MSG
                        (usbduxfastsub->usbdev,
                         usb_sndctrlpipe(usbduxfastsub->usbdev,0),
                         // bRequest, "Firmware"
-                        USBDUXFASTSUB_FIRMWARE, 
+                        USBDUXFASTSUB_FIRMWARE,
                         // bmRequestType
                         VENDOR_DIR_OUT,
                         // Value
                         USBDUXFASTSUB_CPUCS,
                         // Index
-                        0x0000, 
+                        0x0000,
                         local_transfer_buffer,
                         // Length
                         1,
                         // Timeout
-                        EZTIMEOUT 
+                        EZTIMEOUT
                         );
                if (errcode<0) {
                        printk("comedi_: usbduxfast: control msg failed (stop)\n");
@@ -530,7 +525,7 @@ static int usbduxfastsub_stop(usbduxfastsub_t* usbduxfastsub) {
        }
        return 0;
 }
-               
+
 
 
 
@@ -585,7 +580,7 @@ return 0;
 
 
 
-int firmwareUpload(usbduxfastsub_t* usbduxfastsub, 
+int firmwareUpload(usbduxfastsub_t* usbduxfastsub,
                   unsigned char* firmwareBinary,
                   int sizeFirmware) {
        int ret;
@@ -616,7 +611,7 @@ int firmwareUpload(usbduxfastsub_t* usbduxfastsub,
        }
        return 0;
 }
-       
+
 
 
 int usbduxfastsub_submit_InURBs(usbduxfastsub_t* usbduxfastsub) {
@@ -653,8 +648,8 @@ int usbduxfastsub_submit_InURBs(usbduxfastsub_t* usbduxfastsub) {
 
 
 
-static int usbduxfast_ai_cmdtest(comedi_device *dev, 
-                            comedi_subdevice *s, 
+static int usbduxfast_ai_cmdtest(comedi_device *dev,
+                            comedi_subdevice *s,
                             comedi_cmd *cmd)
 {
        int err=0, stop_mask=0;
@@ -909,7 +904,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
        }
        steps=0;
        if(cmd->scan_begin_src == TRIG_TIMER) {
-               printk("comedi%d: usbduxfast: scan_begin_src==TRIG_TIMER not valid.\n", 
+               printk("comedi%d: usbduxfast: scan_begin_src==TRIG_TIMER not valid.\n",
                       dev->minor);
                up(&this_usbduxfastsub->sem);
                return -EINVAL;
@@ -918,8 +913,8 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                steps=(cmd->convert_arg*30)/1000;
        }
        if ((steps<MIN_SAMPLING_PERIOD)&&(cmd->chanlist_len!=1)) {
-               printk("comedi%d: usbduxfast: ai_cmd: steps=%ld, scan_begin_arg=%d. Not properly tested by cmdtest?\n", 
-                      dev->minor, 
+               printk("comedi%d: usbduxfast: ai_cmd: steps=%ld, scan_begin_arg=%d. Not properly tested by cmdtest?\n",
+                      dev->minor,
                       steps,
                       cmd->scan_begin_arg);
                up(&this_usbduxfastsub->sem);
@@ -963,7 +958,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                        this_usbduxfastsub->dux_commands[OPBASE+0]=0;
                        this_usbduxfastsub->dux_commands[OUTBASE+0]=0xFF & rngmask;
                        this_usbduxfastsub->dux_commands[LOGBASE+0]=0;
-               }                               
+               }
 
                if (steps<MIN_SAMPLING_PERIOD) {
                        // for fast single channel aqu without mux
@@ -992,19 +987,19 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
 
                        // we have 1 state with duration 1
                        steps=steps-1;
-                       
+
                        // do the first part of the delay
                        this_usbduxfastsub->dux_commands[LENBASE+1]=steps/2;
                        this_usbduxfastsub->dux_commands[OPBASE+1]=0;
                        this_usbduxfastsub->dux_commands[OUTBASE+1]=0xFF & rngmask;
                        this_usbduxfastsub->dux_commands[LOGBASE+1]=0;
-                       
+
                        // and the second part
                        this_usbduxfastsub->dux_commands[LENBASE+2]=steps-steps/2;
                        this_usbduxfastsub->dux_commands[OPBASE+2]=0;
                        this_usbduxfastsub->dux_commands[OUTBASE+2]=0xFF & rngmask;
                        this_usbduxfastsub->dux_commands[LOGBASE+2]=0;
-                       
+
                        // get the data and branch back
                        this_usbduxfastsub->dux_commands[LENBASE+3]=0x09; // branch back to state 1
                        this_usbduxfastsub->dux_commands[OPBASE+3]=0x03; // deceision state w data
@@ -1037,7 +1032,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                this_usbduxfastsub->dux_commands[OPBASE+2]=0;
                this_usbduxfastsub->dux_commands[OUTBASE+2]=0xFF & rngmask;
                this_usbduxfastsub->dux_commands[LOGBASE+2]=0;
-               
+
                this_usbduxfastsub->dux_commands[LENBASE+3]=1;
                this_usbduxfastsub->dux_commands[OPBASE+3]=0x02; // data
                this_usbduxfastsub->dux_commands[OUTBASE+3]=0xFF & rngmask;
@@ -1058,7 +1053,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                this_usbduxfastsub->dux_commands[OPBASE+5]=0;
                this_usbduxfastsub->dux_commands[OUTBASE+5]=0xFF & rngmask;
                this_usbduxfastsub->dux_commands[LOGBASE+5]=0;
-               
+
                this_usbduxfastsub->dux_commands[LENBASE+6]=1;
                this_usbduxfastsub->dux_commands[OPBASE+6]=0;
                this_usbduxfastsub->dux_commands[OUTBASE+6]=0xFF & rngmask;
@@ -1082,7 +1077,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                        this_usbduxfastsub->dux_commands[OUTBASE+j*2+1]=0xFE & rngmask; //count
                        this_usbduxfastsub->dux_commands[LOGBASE+j*2+1]=0;
                }
-               
+
                // 2 steps with duration 1: the idele step and step 6:
                steps_tmp=steps-2;
                // commit data to the FIFO and do the first part of the delay
@@ -1090,7 +1085,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                this_usbduxfastsub->dux_commands[OPBASE+4]=0x02; // data
                this_usbduxfastsub->dux_commands[OUTBASE+4]=0xFF & rngmask; // no change
                this_usbduxfastsub->dux_commands[LOGBASE+4]=0;
-               
+
                if (CR_RANGE(cmd->chanlist[0])>0) rngmask=0xff-0x04; else rngmask=0xff;
                // do the second part of the delay
                this_usbduxfastsub->dux_commands[LENBASE+5]=steps_tmp-steps_tmp/2;
@@ -1102,7 +1097,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                this_usbduxfastsub->dux_commands[OPBASE+6]=0;
                this_usbduxfastsub->dux_commands[OUTBASE+6]=0xFF & rngmask;
                this_usbduxfastsub->dux_commands[LOGBASE+6]=0;
-               
+
        case 16:
                if (CR_RANGE(cmd->chanlist[0])>0) rngmask=0xff-0x04; else rngmask=0xff;
                if(cmd->start_src == TRIG_EXT) { // we loop here until ready has been set
@@ -1115,7 +1110,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                        this_usbduxfastsub->dux_commands[OPBASE+0]=0;
                        this_usbduxfastsub->dux_commands[OUTBASE+0]=(0xFF-0x02) & rngmask; // reset
                        this_usbduxfastsub->dux_commands[LOGBASE+0]=0;
-               }                               
+               }
 
                // commit data to the FIFO
                this_usbduxfastsub->dux_commands[LENBASE+1]=1;
@@ -1151,7 +1146,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                up(&this_usbduxfastsub->sem);
                return -EFAULT;
        }
-               
+
 
 #ifdef CONFIG_COMEDI_DEBUG
        printk("comedi %d: sending commands to the usb device\n",
@@ -1173,7 +1168,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
                        up(&this_usbduxfastsub->sem);
                        return -EFAULT;
                }
-               this_usbduxfastsub->ai_continous=0;     
+               this_usbduxfastsub->ai_continous=0;
        } else {
                // continous aquisition
                this_usbduxfastsub->ai_continous=1;
@@ -1250,28 +1245,28 @@ static int usbduxfast_ai_insn_read(comedi_device * dev,
        usbduxfastsub->dux_commands[OPBASE+0]=0x02; // data
        usbduxfastsub->dux_commands[OUTBASE+0]=0xFF & rngmask;
        usbduxfastsub->dux_commands[LOGBASE+0]=0;
-       
+
        // do the first part of the delay
        usbduxfastsub->dux_commands[LENBASE+1]=12;
        usbduxfastsub->dux_commands[OPBASE+1]=0;
        usbduxfastsub->dux_commands[OUTBASE+1]=0xFE & rngmask;
        usbduxfastsub->dux_commands[LOGBASE+1]=0;
-       
+
        usbduxfastsub->dux_commands[LENBASE+2]=1;
        usbduxfastsub->dux_commands[OPBASE+2]=0;
        usbduxfastsub->dux_commands[OUTBASE+2]=0xFE & rngmask;
        usbduxfastsub->dux_commands[LOGBASE+2]=0;
-               
+
        usbduxfastsub->dux_commands[LENBASE+3]=1;
        usbduxfastsub->dux_commands[OPBASE+3]=0;
        usbduxfastsub->dux_commands[OUTBASE+3]=0xFE & rngmask;
        usbduxfastsub->dux_commands[LOGBASE+3]=0;
-               
+
        usbduxfastsub->dux_commands[LENBASE+4]=1;
        usbduxfastsub->dux_commands[OPBASE+4]=0;
        usbduxfastsub->dux_commands[OUTBASE+4]=0xFE & rngmask;
        usbduxfastsub->dux_commands[LOGBASE+4]=0;
-       
+
        // second part
        usbduxfastsub->dux_commands[LENBASE+5]=12;
        usbduxfastsub->dux_commands[OPBASE+5]=0;
@@ -1303,7 +1298,7 @@ static int usbduxfast_ai_insn_read(comedi_device * dev,
               (int)(usbduxfastsub->urbIn->dev));
 #endif
        for(i=0;i<PACKETS_TO_IGNORE;i++) {
-               err=USB_BULK_MSG(usbduxfastsub->usbdev, 
+               err=USB_BULK_MSG(usbduxfastsub->usbdev,
                                 usb_rcvbulkpipe(usbduxfastsub->usbdev,BULKINEP),
                                 usbduxfastsub->transfer_buffer,
                                 SIZEINBUF,
@@ -1318,7 +1313,7 @@ static int usbduxfast_ai_insn_read(comedi_device * dev,
        }
        // data points
        for(i=0;i<insn->n;) {
-               err=USB_BULK_MSG(usbduxfastsub->usbdev, 
+               err=USB_BULK_MSG(usbduxfastsub->usbdev,
                                 usb_rcvbulkpipe(usbduxfastsub->usbdev,BULKINEP),
                                 usbduxfastsub->transfer_buffer,
                                 SIZEINBUF,
@@ -1336,7 +1331,7 @@ static int usbduxfast_ai_insn_read(comedi_device * dev,
                               dev->minor);
                        up(&usbduxfastsub->sem);
                        return -EINVAL;
-               }                       
+               }
                for(j=chan;(j<n)&&(i<insn->n);j=j+16) {
                        data[i]=((uint16_t*)(usbduxfastsub->transfer_buffer))[j];
                        i++;
@@ -1382,7 +1377,7 @@ static int read_firmware(usbduxfastsub_t* usbduxfastsub, void *firmwarePtr,long
                       );
                return -ENOMEM;
        }
-       
+
        for (;;) {
                char    buf[256],*cp;
                char    type;
@@ -1431,7 +1426,7 @@ static int read_firmware(usbduxfastsub_t* usbduxfastsub, void *firmwarePtr,long
                        printk("comedi_: usbduxfast: firmware upload goes beyond FX2 RAM boundaries.");
                        return -EFAULT;
                }
-               
+
                //printk("comedi_: usbduxfast: off=%x, len=%x:",off,len);
 
                /* Read the record type */
@@ -1522,11 +1517,11 @@ static void tidy_up(usbduxfastsub_t* usbduxfastsub_tmp) {
 
 // allocate memory for the urbs and initialise them
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-static void* usbduxfastsub_probe(struct usb_device *udev, 
+static void* usbduxfastsub_probe(struct usb_device *udev,
                             unsigned int interfnum,
                             const struct usb_device_id *id) {
 #else
-static int usbduxfastsub_probe(struct usb_interface *uinterf, 
+static int usbduxfastsub_probe(struct usb_interface *uinterf,
                           const struct usb_device_id *id) {
         struct usb_device *udev = interface_to_usbdev(uinterf);
 #endif
@@ -1618,7 +1613,7 @@ static int usbduxfastsub_probe(struct usb_interface *uinterf,
                tidy_up(&(usbduxfastsub[index]));
                up(&start_stop_sem);
                return PROBE_ERR_RETURN( -ENOMEM);
-       }               
+       }
        usbduxfastsub[index].transfer_buffer=
                kmalloc(SIZEINBUF,GFP_KERNEL);
        if (!(usbduxfastsub[index].transfer_buffer)) {
@@ -1629,7 +1624,7 @@ static int usbduxfastsub_probe(struct usb_interface *uinterf,
        }
        // we've reached the bottom of the function
        usbduxfastsub[index].probed=1;
-       up(&start_stop_sem);    
+       up(&start_stop_sem);
        printk("comedi_: usbduxfast%d has been successfully initialized.\n",index);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
        return (void*)(&usbduxfastsub[index]);
@@ -1655,7 +1650,7 @@ static void usbduxfastsub_disconnect(struct usb_interface *intf) {
        if (!usbduxfastsub_tmp) {
                printk("comedi_: usbduxfast: disconnect called with null pointer.\n");
                return;
-       }               
+       }
        if (usbduxfastsub_tmp->usbdev!=udev) {
                printk("comedi_: usbduxfast: BUG! called with wrong ptr!!!\n");
                return;
@@ -1706,15 +1701,15 @@ static int usbduxfast_attach(comedi_device * dev, comedi_devconfig * it)
        usbduxfastsub[index].comedidev=dev;
 
        // trying to upload the firmware into the chip
-       if(comedi_aux_data(it->options, 0) && 
+       if(comedi_aux_data(it->options, 0) &&
           it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH]){
                read_firmware(usbduxfastsub,
                        comedi_aux_data(it->options, 0),
                              it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH]);
-       } 
+       }
 
        dev->board_name = BOARDNAME;
-       
+
        /* set number of subdevices */
        dev->n_subdevices=N_SUBDEVICES;
 
@@ -1901,7 +1896,7 @@ static void exit_usbduxfast(void) {
 
 
 module_init(init_usbduxfast);
-module_exit(exit_usbduxfast);                                      
+module_exit(exit_usbduxfast);
 
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
index 718debe6d569fd828cbeb83df945e55e6849b37b..a85266bb224d8aafb8bb0556467c387924147823 100644 (file)
@@ -268,7 +268,7 @@ static const int comedi_debug = 0;
  * function prototypes
  */
 
-void comedi_event(comedi_device *dev,comedi_subdevice *s,unsigned int mask);
+void comedi_event(comedi_device *dev, comedi_subdevice *s);
 void comedi_error(const comedi_device *dev,const char *s);
 
 /* we can expand the number of bits used to encode devices/subdevices into