summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/pcl724.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-18 14:34:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-19 11:19:54 -0700
commit3d1fe3f785c80e17f62acf8f92570ae9210bd588 (patch)
treed20f806696abf44f8504824777feff14cf2c6ae7 /drivers/staging/comedi/drivers/pcl724.c
parenta32c6d0084992d3e58a93120c9ce9527e80c651e (diff)
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/pcl724.c')
-rw-r--r--drivers/staging/comedi/drivers/pcl724.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c
index 3a3e4f58a083..4f033d88eeca 100644
--- a/drivers/staging/comedi/drivers/pcl724.c
+++ b/drivers/staging/comedi/drivers/pcl724.c
@@ -173,10 +173,6 @@ static void pcl724_detach(struct comedi_device *dev)
for (i = 0; i < dev->n_subdevices; i++)
comedi_spriv_free(dev, i);
-#ifdef PCL724_IRQ
- if (dev->irq)
- free_irq(dev->irq, dev);
-#endif
comedi_legacy_detach(dev);
}