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>
This commit is contained in:
parent
9e29ce104a
commit
bcd22e8ece
1 changed files with 3 additions and 8 deletions
|
@ -418,12 +418,9 @@ static int das16cs_auto_attach(struct comedi_device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
dev->iobase = link->resource[0]->start;
|
dev->iobase = link->resource[0]->start;
|
||||||
|
|
||||||
if (!link->irq)
|
link->priv = dev;
|
||||||
return -EINVAL;
|
ret = pcmcia_request_irq(link, das16cs_interrupt);
|
||||||
|
if (ret)
|
||||||
ret = request_irq(link->irq, das16cs_interrupt, IRQF_SHARED,
|
|
||||||
dev->board_name, dev);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
dev->irq = link->irq;
|
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)
|
static void das16cs_detach(struct comedi_device *dev)
|
||||||
{
|
{
|
||||||
if (dev->irq)
|
|
||||||
free_irq(dev->irq, dev);
|
|
||||||
comedi_pcmcia_disable(dev);
|
comedi_pcmcia_disable(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue