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>
#define IRQ_POLARITY 1
-#define NI_E_IRQ_FLAGS IRQF_SHARED
-
struct ni_private {
struct pcmcia_device *link;
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;
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);
}