Skip to content

Commit

Permalink
staging: comedi: cb_das16_cs: use pcmcia_request_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent 9e29ce1 commit bcd22e8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/staging/comedi/drivers/cb_das16_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit bcd22e8

Please sign in to comment.