}
dev->iobase=iobase_9;
- dev->iosize=this_board->iorange_9118;
- request_region(dev->iobase, dev->iosize, "ADLink PCI-9118");
+ request_region(dev->iobase, this_board->iorange_9118, "ADLink PCI-9118");
dev->board_name = this_board->name;
free_irq(dev->irq,dev);
}
- release_region(dev->iobase,dev->iosize);
+ if(dev->iobase){
+ release_region(dev->iobase, this_board->iorange_9118);
+ }
return 0;
}
attach: parport_attach,
detach: parport_detach,
};
+COMEDI_INITCLEANUP(driver_parport);
+
typedef struct parport_private_struct{
unsigned int a_data;
}
request_region(iobase,PARPORT_SIZE,"parport (comedi)");
dev->iobase=iobase;
- dev->iosize=PARPORT_SIZE;
irq=it->options[1];
if(irq){
{
printk("comedi%d: parport: remove\n",dev->minor);
- if(dev->iobase)release_region(dev->iobase,dev->iosize);
+ if(dev->iobase)release_region(dev->iobase,PARPORT_SIZE);
if(dev->irq)comedi_free_irq(dev->irq,dev);
return 0;
}
-COMEDI_INITCLEANUP(driver_parport);
-
}
dev->board_name = thisboard->name;
- dev->iosize = DAS08_SIZE;
dev->n_subdevices=5;
if((ret=alloc_subdevices(dev))<0)
}
request_region(iobase, DAS1800_SIZE, "das1800");
dev->iobase = iobase;
- dev->iosize = DAS1800_SIZE;
board = das1800_probe(dev);
if(board < 0)
}
request_region(iobase, DAS800_SIZE, "das800");
dev->iobase = iobase;
- dev->iosize = DAS800_SIZE;
board = das800_probe(dev);
if(board < 0)
request_region(dev->iobase, DT2811_SIZE, driver_name);
dev->board_name = this_board->name;
- dev->iosize = DT2811_SIZE;
#if 0
outb(0, dev->iobase + DT2811_ADCSR);
if (dev->irq) {
free_irq(dev->irq, dev);
}
- release_region(dev->iobase, dev->iosize);
+ if(dev->iobase){
+ release_region(dev->iobase, DT2811_SIZE);
+ }
return 0;
}
}
request_region(dev->iobase,DT2814_SIZE,"dt2814");
dev->iobase=dev->iobase;
- dev->iosize=DT2814_SIZE;
dev->board_name = "dt2814";
outb(0,dev->iobase+DT2814_CSR);
free_irq(dev->irq,dev);
}
if(dev->iobase){
- release_region(dev->iobase,dev->iosize);
+ release_region(dev->iobase,DT2814_SIZE);
}
return 0;
}
request_region(dev->iobase,DT2817_SIZE,"dt2817");
dev->board_name="dt2817";
- dev->iosize=DT2817_SIZE;
dev->n_subdevices=1;
if((ret=alloc_subdevices(dev))<0)
{
printk("comedi%d: dt2817: remove\n",dev->minor);
- release_region(dev->iobase,dev->iosize);
+ if(dev->iobase)
+ release_region(dev->iobase,DT2817_SIZE);
return 0;
}
return -EBUSY;
}
request_region(dev->iobase, DT2821_SIZE, "dt282x");
- dev->iosize = DT2821_SIZE;
outw(DT2821_BDINIT, dev->iobase + DT2821_SUPCSR);
i = inw(dev->iobase + DT2821_ADCSR);
free_irq(dev->irq, dev);
}
if(dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, DT2821_SIZE);
if(dev->private){
if (devpriv->dma[0].chan)
free_dma(devpriv->dma[0].chan);
request_region(dev->iobase, MULTIQ3_SIZE, "multiq3");
dev->iobase = iobase;
- dev->iosize = MULTIQ3_SIZE;
irq = it->options[1];
if (irq > 0) {
{
printk("comedi%d: multiq3: remove\n", dev->minor);
- if (dev->iobase) { release_region(dev->iobase, dev->iosize); }
+ if (dev->iobase) { release_region(dev->iobase, MULTIQ3_SIZE); }
if (dev->irq) { free_irq(dev->irq,dev); }
return 0;
request_region(iobase,NI_SIZE,"ni_atmio");
dev->iobase=iobase;
- dev->iosize=NI_SIZE;
#ifdef DEBUG
/* board existence sanity check */
}
request_region(iobase, ATMIO16D_SIZE, "ni_atmio16d");
dev->iobase = iobase;
- dev->iosize = ATMIO16D_SIZE;
/* board name */
reset_atmio16d(dev);
if(dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, ATMIO16D_SIZE);
return 0;
}
free_irq(dev->irq, dev);
if (dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, PCL711_SIZE);
}
/* Initialization */
}
request_region(dev->iobase, PCL711_SIZE, "pcl711");
dev->iobase = iobase;
- dev->iosize = PCL711_SIZE;
/* there should be a sanity check here */
num_names: n_boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_pcl724);
static int subdev_8255_cb(int dir,int port,int data,void *arg)
request_region(iobase, iorange, "pcl724");
dev->iobase=iobase;
- dev->iosize=iorange;
dev->board_name = this_board->name;
}
#endif
- release_region(dev->iobase,dev->iosize);
+ release_region(dev->iobase,this_board->io_range);
return 0;
}
-COMEDI_INITCLEANUP(driver_pcl724);
-
request_region(dev->iobase,PCL725_SIZE,"pcl725");
dev->board_name="pcl725";
dev->iobase=dev->iobase;
- dev->iosize=PCL725_SIZE;
dev->irq=0;
dev->n_subdevices=2;
{
printk("comedi%d: pcl725: remove\n",dev->minor);
- if(dev->iobase)release_region(dev->iobase,dev->iosize);
+ if(dev->iobase)release_region(dev->iobase,PCL725_SIZE);
return 0;
}
num_names: n_boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_pcl726);
typedef struct{
int bipolar[12];
request_region(iobase, iorange, "pcl726");
dev->iobase=iobase;
- dev->iosize=iorange;
dev->board_name = this_board->name;
}
#endif
- release_region(dev->iobase,dev->iosize);
+ release_region(dev->iobase,this_board->io_range);
return 0;
}
-COMEDI_INITCLEANUP(driver_pcl726);
-
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, this_board->io_range);
#ifdef USE_DMA
if (dev->private) {
if (devpriv->dmabuf[0])
}
request_region(iobase, this_board->io_range, "pcl812");
dev->iobase = iobase;
- dev->iosize = this_board->io_range;
/* there should be a sanity check here */
}
if (dev->irq) free_irq(dev->irq, dev);
- if (dev->iobase) release_region(dev->iobase, dev->iosize);
+ if (dev->iobase) release_region(dev->iobase, this_board->io_range);
//rt_printk("free_resource() end\n");
}
request_region(iobase, io_range, "pcl818");
dev->iobase=iobase;
- dev->iosize=io_range;
if (pcl818_check(iobase)) {
rt_printk(", I can't detect board. FAIL!\n");
}
request_region(iobase, iosize, "dac02");
dev->iobase = iobase;
- dev->iosize = iosize;
dev->n_subdevices = 1;
if(alloc_subdevices(dev) < 0)
{
/* only free stuff if it has been allocated by _attach */
if(dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, this_board->iosize);
printk("comedi%d: dac02: remove\n", dev->minor);
}
request_region(dev->iobase, RTI800_SIZE, "rti800");
dev->iobase = iobase;
- dev->iosize = RTI800_SIZE;
#ifdef DEBUG
printk("fingerprint=%x,%x,%x,%x,%x ",
printk("comedi%d: rti800: remove\n", dev->minor);
if(dev->iobase)
- release_region(dev->iobase, dev->iosize);
+ release_region(dev->iobase, RTI800_SIZE);
if(dev->irq)
free_irq(dev->irq,dev);