of io mem regions in mite.c (was removed earlier due to my wrong assumption
about the nature of the return value from request_mem_region).
unsigned long offset, start, length;
u32 addr;
+ if( pci_request_regions( mite->pcidev, "mite" ) ) {
+ printk("failed to request mite io regions\n");
+ return -EIO;
+ };
if(pci_enable_device(mite->pcidev)){
printk("error enabling mite\n");
return -EIO;
iounmap(mite->daq_io_addr);
mite->daq_io_addr=NULL;
}
+ pci_release_regions( mite->pcidev );
mite->used = 0;
}
kfree(devpriv->dma_buffer);
if(devpriv->dma_chan)
free_dma(devpriv->dma_chan);
- if(thisboard->bustype != pcmcia_bustype &&
- dev->iobase)
- release_region(dev->iobase, LABPC_SIZE);
if(dev->irq)
comedi_free_irq(dev->irq, dev);
+ if(thisboard->bustype == isa_bustype &&
+ dev->iobase)
+ release_region(dev->iobase, LABPC_SIZE);
+ if( devpriv->mite )
+ mite_unsetup( devpriv->mite );
return 0;
};