diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-04 21:20:29 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-04 22:47:19 (GMT) |
commit | bcd22e8ecee9f48f8668418cef5d523f219f7d1a (patch) | |
tree | 62aab2944eea9bcf419276428b83b38701b0948c | |
parent | 9e29ce104a83d801c7fc6bc57c189608195e831e (diff) | |
download | linux-fsl-qoriq-bcd22e8ecee9f48f8668418cef5d523f219f7d1a.tar.xz |
staging: comedi: cb_das16_cs: use pcmcia_request_irq()
Use pcmcia_request_irq() instead of request_irq() to request the
irq for the PCMCIA device. This allows the PCMCIA core to clean
up the registration in pcmcia_disable_device().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/cb_das16_cs.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 8763726..e1318fa 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -418,12 +418,9 @@ static int das16cs_auto_attach(struct comedi_device *dev, return ret; dev->iobase = link->resource[0]->start; - if (!link->irq) - return -EINVAL; - - ret = request_irq(link->irq, das16cs_interrupt, IRQF_SHARED, - dev->board_name, dev); - if (ret < 0) + link->priv = dev; + ret = pcmcia_request_irq(link, das16cs_interrupt); + if (ret) return ret; dev->irq = link->irq; @@ -482,8 +479,6 @@ static int das16cs_auto_attach(struct comedi_device *dev, static void das16cs_detach(struct comedi_device *dev) { - if (dev->irq) - free_irq(dev->irq, dev); comedi_pcmcia_disable(dev); } |