static void aio_aio12_8_detach(struct comedi_device *dev)
{
comedi_spriv_free(dev, 2);
- if (dev->iobase)
- release_region(dev->iobase, 24);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver aio_aio12_8_driver = {
free_irq(dev->irq, dev);
comedi_spriv_free(dev, 0);
if (is_isa_board(thisboard)) {
- if (dev->iobase)
- release_region(dev->iobase, PC236_IO_SIZE);
+ comedi_legacy_detach(dev);
} else if (is_pci_board(thisboard)) {
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
comedi_pci_disable(dev);
static void c6xdigio_detach(struct comedi_device *dev)
{
- if (dev->iobase)
- release_region(dev->iobase, C6XDIGIO_SIZE);
+ comedi_legacy_detach(dev);
pnp_unregister_driver(&c6xdigio_pnp_driver);
}
static void parport_detach(struct comedi_device *dev)
{
- if (dev->iobase)
- release_region(dev->iobase, PARPORT_SIZE);
if (dev->irq)
free_irq(dev->irq, dev);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver parport_driver = {
static void das08_isa_detach(struct comedi_device *dev)
{
- const struct das08_board_struct *thisboard = comedi_board(dev);
-
das08_common_detach(dev);
- if (dev->iobase)
- release_region(dev->iobase, thisboard->iosize);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver das08_isa_driver = {
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, DAS6402_SIZE);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver das6402_driver = {
static void das800_detach(struct comedi_device *dev)
{
- if (dev->iobase)
- release_region(dev->iobase, DAS800_SIZE);
if (dev->irq)
free_irq(dev->irq, dev);
-};
+ comedi_legacy_detach(dev);
+}
static int das800_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, DMM32AT_MEMSIZE);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver dmm32at_driver = {
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, DT2811_SIZE);
+ comedi_legacy_detach(dev);
}
static const struct dt2811_board boardtypes[] = {
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, DT2814_SIZE);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver dt2814_driver = {
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, DT2821_SIZE);
if (dev->private) {
if (devpriv->dma[0].chan)
free_dma(devpriv->dma[0].chan);
if (devpriv->dma[1].buf)
free_page((unsigned long)devpriv->dma[1].buf);
}
+ comedi_legacy_detach(dev);
}
static const struct dt282x_board boardtypes[] = {
{
struct a2150_private *devpriv = dev->private;
- if (dev->iobase) {
+ if (dev->iobase)
outw(APD_BIT | DPD_BIT, dev->iobase + CONFIG_REG);
- release_region(dev->iobase, A2150_SIZE);
- }
if (dev->irq)
free_irq(dev->irq, dev);
if (devpriv) {
free_dma(devpriv->dma);
kfree(devpriv->dma_buffer);
}
+ comedi_legacy_detach(dev);
};
static struct comedi_driver ni_at_a2150_driver = {
struct ni_private *devpriv = dev->private;
mio_common_detach(dev);
- if (dev->iobase)
- release_region(dev->iobase, NI_SIZE);
if (dev->irq)
free_irq(dev->irq, dev);
+ comedi_legacy_detach(dev);
if (devpriv->isapnp_dev)
pnp_device_detach(devpriv->isapnp_dev);
}
if (dev->irq)
free_irq(dev->irq, dev);
reset_atmio16d(dev);
- if (dev->iobase)
- release_region(dev->iobase, ATMIO16D_SIZE);
+ comedi_legacy_detach(dev);
}
static const struct atmio16_board_t atmio16_boards[] = {
#endif
if (dev->irq)
free_irq(dev->irq, dev);
- if (board->bustype == isa_bustype && dev->iobase)
- release_region(dev->iobase, LABPC_SIZE);
+ if (board->bustype == isa_bustype)
+ comedi_legacy_detach(dev);
#ifdef CONFIG_COMEDI_PCI_DRIVERS
if (devpriv->mite) {
mite_unsetup(devpriv->mite);
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, PCL711_SIZE);
+ comedi_legacy_detach(dev);
}
static const struct pcl711_board boardtypes[] = {
static void pcl724_detach(struct comedi_device *dev)
{
- const struct pcl724_board *board = comedi_board(dev);
int i;
for (i = 0; i < dev->n_subdevices; i++)
if (dev->irq)
free_irq(dev->irq, dev);
#endif
- release_region(dev->iobase, board->io_range);
+ comedi_legacy_detach(dev);
}
static const struct pcl724_board boardtypes[] = {
static void pcl726_detach(struct comedi_device *dev)
{
- const struct pcl726_board *board = comedi_board(dev);
-
#ifdef ACL6126_IRQ
if (dev->irq)
free_irq(dev->irq, dev);
#endif
- if (dev->iobase)
- release_region(dev->iobase, board->io_range);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver pcl726_driver = {
static void pcl816_detach(struct comedi_device *dev)
{
- const struct pcl816_board *board = comedi_board(dev);
struct pcl816_private *devpriv = dev->private;
if (dev->private) {
}
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, board->io_range);
#ifdef unused
if (devpriv->dma_rtc)
RTC_lock--;
#endif
+ comedi_legacy_detach(dev);
}
static const struct pcl816_board boardtypes[] = {
}
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, devpriv->io_range);
+ comedi_legacy_detach(dev);
}
static const struct pcl818_board boardtypes[] = {
for (i = 0; i < dev->n_subdevices; i++)
comedi_spriv_free(dev, i);
- if (dev->iobase)
- release_region(dev->iobase, PCM3724_SIZE);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver pcm3724_driver = {
{
if (dev->irq)
free_irq(dev->irq, dev);
- if (dev->iobase)
- release_region(dev->iobase, PCMAD_SIZE);
+ comedi_legacy_detach(dev);
}
static const struct pcmad_board_struct pcmad_boards[] = {
struct pcmmio_private *devpriv = dev->private;
int i;
- if (dev->iobase)
- release_region(dev->iobase, 32);
for (i = 0; i < MAX_ASICS; ++i) {
if (devpriv && devpriv->asics[i].irq)
free_irq(devpriv->asics[i].irq, dev);
}
if (devpriv && devpriv->sprivs)
kfree(devpriv->sprivs);
+ comedi_legacy_detach(dev);
}
static struct comedi_driver pcmmio_driver = {
static void pcmuio_detach(struct comedi_device *dev)
{
- const struct pcmuio_board *board = comedi_board(dev);
struct pcmuio_private *devpriv = dev->private;
int i;
- if (dev->iobase)
- release_region(dev->iobase, ASIC_IOSIZE * board->num_asics);
for (i = 0; i < MAX_ASICS; ++i) {
if (devpriv->asics[i].irq)
free_irq(devpriv->asics[i].irq, dev);
}
if (devpriv && devpriv->sprivs)
kfree(devpriv->sprivs);
+ comedi_legacy_detach(dev);
}
static const struct pcmuio_board pcmuio_boards[] = {