diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-18 14:34:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 11:19:54 -0700 |
commit | 3d1fe3f785c80e17f62acf8f92570ae9210bd588 (patch) | |
tree | d20f806696abf44f8504824777feff14cf2c6ae7 /drivers/staging/comedi/drivers/ni_atmio.c | |
parent | staging: comedi: drivers: use comedi_legacy_detach() (diff) | |
download | linux-dev-3d1fe3f785c80e17f62acf8f92570ae9210bd588.tar.xz linux-dev-3d1fe3f785c80e17f62acf8f92570ae9210bd588.zip |
staging: comedi: drivers: free_irq() in comedi_legacy_detach()
All the legacy comedi drivers now call comedi_legacy_detach()
either directly or as part of their (*detach). Move the free_irq()
into comedi_legacy_detach() so that the drivers don't have to
deal with it.
For drivers that then only call comedi_legacy_detach() in their
private (*detach), remove the private function and use the helper
directly for the (*detach).
The amplc_pc236 and ni_labpc drivers are hybrid legacy/PCI drivers.
In the detach of a PCI board free_irq() still needs to be handled
by the driver.
The pcl724 and pcl726 drivers currently have the free_irq() #ifdef'ed
out. The comedi_legacy_detach() function sanity checks that the irq
has been requested before freeing it so they are safe to convert.
For aesthetic reasons, move the #ifdef unused chunk in the pcl816
driver up to the previous #ifdef unused block.
The pcmio and pcmuio drivers request multiple irqs and handle the
freeing of them. Remove the 'dev->irq = irq[0]' in those drivers
so that comedi_legacy_detach() does not attempt to free the irq.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_atmio.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_atmio.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index d439f6b5a995..4ced7ba119b0 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -499,8 +499,6 @@ static void ni_atmio_detach(struct comedi_device *dev) struct ni_private *devpriv = dev->private; mio_common_detach(dev); - if (dev->irq) - free_irq(dev->irq, dev); comedi_legacy_detach(dev); if (devpriv->isapnp_dev) pnp_device_detach(devpriv->isapnp_dev); |