diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-06 01:16:53 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-06 02:16:19 (GMT) |
commit | 82e9ee616a89f152f42c7051c5f9f5f0d7663652 (patch) | |
tree | 03c198648e6dcfa0c9f91464579e03c059de23c6 | |
parent | 5cd8e852629fc7f1bdaacbdd32fe4139b9944f8b (diff) | |
download | linux-82e9ee616a89f152f42c7051c5f9f5f0d7663652.tar.xz |
staging: comedi: ni_mio_cs: use pcmcia_request_irq()
Use pcmcia_request_irq() instead of request_irq() to request the
shared 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/ni_mio_cs.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c index 4da4d09..888be7b 100644 --- a/drivers/staging/comedi/drivers/ni_mio_cs.c +++ b/drivers/staging/comedi/drivers/ni_mio_cs.c @@ -149,8 +149,6 @@ static const struct ni_board_struct ni_boards[] = { #define IRQ_POLARITY 1 -#define NI_E_IRQ_FLAGS IRQF_SHARED - struct ni_private { struct pcmcia_device *link; @@ -257,12 +255,9 @@ static int mio_cs_auto_attach(struct comedi_device *dev, return ret; dev->iobase = link->resource[0]->start; - if (!link->irq) - return -EINVAL; - - ret = request_irq(link->irq, ni_E_interrupt, NI_E_IRQ_FLAGS, - dev->board_name, dev); - if (ret < 0) + link->priv = dev; + ret = pcmcia_request_irq(link, ni_E_interrupt); + if (ret) return ret; dev->irq = link->irq; @@ -282,8 +277,6 @@ static int mio_cs_auto_attach(struct comedi_device *dev, static void mio_cs_detach(struct comedi_device *dev) { mio_common_detach(dev); - if (dev->irq) - free_irq(dev->irq, dev); comedi_pcmcia_disable(dev); } |