request_region(devpriv->iobase_a, devpriv->iosize_a, "ADLink PCI-9118");
if (irq>0) {
- if (request_irq(irq, interrupt_pci9118, SA_INTERRUPT, "ADLink PCI-9118", dev)) {
+ if (comedi_request_irq(irq, interrupt_pci9118, 0, "ADLink PCI-9118", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
echo "uses cmd"
cmd=yes
else
+ echo "W: doesn't use cmd"
cmd=no
fi
echo "uses insn"
insn=yes
else
+ echo "W: doesn't use insn"
insn=no
fi
echo "W: suggest using COMEDI_INITCLEANUP"
fi
+if grep 'range_unknown' ${driver} &>/dev/null;then
+ echo "W: uses range_unknown"
+fi
/* now for the irq */
irq=it->options[1];
if(irq>0){
- if((ret=request_irq(irq,das16_interrupt,SA_INTERRUPT,"das16",dev))<0)
+ if((ret=comedi_request_irq(irq,das16_interrupt,0,"das16",dev))<0)
return ret;
dev->irq=irq;
printk(" ( irq = %d )\n",irq);
if(irq<0 || irq>=16 || irq_list[irq]<0){
return -EINVAL;
}
- if (request_irq(irq, das16_interrupt, SA_INTERRUPT, "das16", dev) == 0) {
+ if (comedi_request_irq(irq, das16_interrupt, 0, "das16", dev) == 0) {
return -EIO;
}
dev->irq=irq;
irq=it->options[0];
printk(" ( irq = %d )", irq);
- ret=request_irq(irq, intr_handler, 0, "das6402", dev);
+ ret=comedi_request_irq(irq, intr_handler, 0, "das6402", dev);
if(ret<0){
printk("irq conflict\n");
return ret;
num_names: sizeof(boardtypes)/sizeof(boardtype),
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_dt2811);
static int dt2811_ai(comedi_device * dev, comedi_subdevice * s, comedi_trig * it);
#if 0
i = inb(dev->iobase + DT2811_ADDATLO);
i = inb(dev->iobase + DT2811_ADDATHI);
printk("(irq = %d)\n", irq);
- request_irq(irq, dt2811_interrupt, 0 * SA_INTERRUPT, driver_name, dev);
+ ret = comedi_request_irq(irq, dt2811_interrupt, 0, driver_name, dev);
+ if(ret<0)return -EIO;
dev->irq = irq;
} else if (irq == 0) {
printk("(no irq)\n");
return it->n_chan;
}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_dt2811);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_dt2811);
-}
-#endif
attach: dt2814_attach,
detach: dt2814_detach,
};
+COMEDI_INITCLEANUP(driver_dt2814);
static void dt2814_interrupt(int irq,void *dev,struct pt_regs * regs);
dev->irq=0;
if(irq>0){
printk("( irq = %d )\n",irq);
- request_irq(irq,dt2814_interrupt,0*SA_INTERRUPT,"dt2814",dev);
+ comedi_request_irq(irq,dt2814_interrupt,0,"dt2814",dev);
dev->irq=irq;
}else if(irq==0){
printk("(no irq)\n");
}
}
-
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_dt2814);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_dt2814);
-}
-#endif
attach: dt2815_attach,
detach: dt2815_detach,
};
+COMEDI_INITCLEANUP(driver_dt2815);
static void dt2815_free_resources(comedi_device * dev);
return 0;
}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_dt2815);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_dt2815);
-}
-#endif
dev->irq = 0;
if (irq > 0) {
printk(" ( irq = %d )", irq);
- request_irq(irq, dt282x_interrupt, SA_INTERRUPT, "dt282x", dev);
+ ret = comedi_request_irq(irq, dt282x_interrupt, 0, "dt282x", dev);
+ if(ret<0)return -EIO;
dev->irq = irq;
} else if (irq == 0) {
printk(" (no irq)");
num_names: n_atmio16_boards,
offset: sizeof(atmio16_board_t),
};
+COMEDI_INITCLEANUP(driver_atmio16d);
/* range structs */
static comedi_lrange range_atmio16d_ai_10_bipolar = { 4, {
/* check if our interrupt is available and get it */
irq=it->options[1];
if(irq>0){
- if((ret=request_irq(irq,atmio16d_interrupt,
- SA_INTERRUPT, "atmio16d", dev))<0)
+ if((ret=comedi_request_irq(irq,atmio16d_interrupt,
+ 0, "atmio16d", dev))<0)
return ret;
dev->irq=irq;
printk("( irq = %d )\n",irq);
return 0;
}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_atmio16d);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_atmio16d);
-
-}
-#endif
attach: nidio_attach,
detach: nidio_detach,
};
+COMEDI_INITCLEANUP(driver_pcidio);
typedef struct{
int dev_id;
return -EIO;
}
-
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_pcidio);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_pcidio);
-}
-#endif
attach: pcimio_attach,
detach: pcimio_detach,
};
+COMEDI_INITCLEANUP(driver_pcimio);
/* How we access registers */
return -EIO;
}
-
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_pcimio);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_pcimio);
-}
-#endif
return -EINVAL;
}
if (irq) {
- if (request_irq(irq, pcl711_interrupt, SA_INTERRUPT, "pcl711", dev)) {
+ if (comedi_request_irq(irq, pcl711_interrupt, 0, "pcl711", dev)) {
printk("unable to allocate irq %d\n", irq);
free_resources(dev);
return -EINVAL;
rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
irq=0; /* Bad IRQ */
} else {
- if (request_irq(irq, interrupt_pcl724, SA_INTERRUPT, "pcl724", dev)) {
+ if (comedi_request_irq(irq, interrupt_pcl724, 0, "pcl724", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
attach: pcl725_attach,
detach: pcl725_detach,
};
+COMEDI_INITCLEANUP(driver_pcl725);
static int pcl725_do(comedi_device *dev,comedi_subdevice *s,comedi_trig *it);
static int pcl725_di(comedi_device *dev,comedi_subdevice *s,comedi_trig *it);
static int pcl725_detach(comedi_device *dev)
{
printk("comedi%d: pcl725: remove\n",dev->minor);
-
- return 0;
-}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_pcl725);
+ if(dev->iobase)release_region(dev->iobase,dev->iosize);
return 0;
}
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_pcl725);
-}
-#endif
rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
irq=0; /* Bad IRQ */
} else {
- if (request_irq(irq, interrupt_pcl818, SA_INTERRUPT, "pcl726", dev)) {
+ if (comedi_request_irq(irq, interrupt_pcl818, 0, "pcl726", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
num_names: n_boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_pcl812);
typedef struct {
#ifdef USE_DMA
printk(", IRQ %d is out of allowed range, DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
- if (request_irq(irq, interrupt_pcl812, SA_INTERRUPT, "pcl812", dev)) {
+ if (comedi_request_irq(irq, interrupt_pcl812, 0, "pcl812", dev)) {
printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq = 0; /* Can't use IRQ */
} else {
return 0;
}
-/*
-==============================================================================
-*/
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_pcl812);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_pcl812);
-}
-
-#endif
-
#if 0
/* @@Kluvi: magic crystaline sphere error correction, I hope
num_names: n_boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_pcl818);
typedef struct {
rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
irq=0; /* Bad IRQ */
} else {
- if (request_irq(irq, interrupt_pcl818, SA_INTERRUPT, "pcl818", dev)) {
+ if (comedi_request_irq(irq, interrupt_pcl818, 0, "pcl818", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
devpriv->rtc_iobase=RTC_PORT(0);
devpriv->rtc_iosize=RTC_IO_EXTENT;
RTC_lock++;
- if (!request_irq(RTC_IRQ, interrupt_pcl818_ai_mode13_dma_rtc, SA_INTERRUPT|SA_SHIRQ, "pcl818 DMA (RTC)", dev)) {
+ if (!comedi_request_irq(RTC_IRQ, interrupt_pcl818_ai_mode13_dma_rtc, 0, "pcl818 DMA (RTC)", dev)) {
devpriv->dma_rtc=1;
devpriv->rtc_irq=RTC_IRQ;
rt_printk(", dma_irq=%d", devpriv->rtc_irq);
return 0;
}
-/*
-==============================================================================
-*/
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_pcl818);
- return 0;
-}
-
-void cleanup_module(void)
-{
- // rt_printk("comedi: pcl818: unreg\n");
- comedi_driver_unregister(&driver_pcl818);
- // rt_printk("comedi: pcl818: unreg end\n");
-}
-#endif
board_name: boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_rti800);
static void rti800_interrupt(int irq, void *dev, struct pt_regs *regs);
irq=it->options[1];
if(irq>0){
printk("( irq = %d )\n",irq);
- if((ret=request_irq(irq,rti800_interrupt, SA_INTERRUPT, "rti800", dev))<0)
+ if((ret=comedi_request_irq(irq,rti800_interrupt, 0, "rti800", dev))<0)
return ret;
dev->irq=irq;
}else if(irq == 0){
return 0;
}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_rti800);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_rti800);
-}
-#endif
attach: rti802_attach,
detach: rti802_detach,
};
+COMEDI_INITCLEANUP(driver_rti802);
static void rti802_free_resources(comedi_device * dev);
return 0;
}
-#ifdef MODULE
-int init_module(void)
-{
- comedi_driver_register(&driver_rti802);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
- comedi_driver_unregister(&driver_rti802);
-}
-#endif