From: H Hartley Sweeten Date: Mon, 4 Feb 2013 21:20:29 +0000 (-0700) Subject: staging: comedi: cb_das16_cs: use pcmcia_request_irq() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bcd22e8ecee9f48f8668418cef5d523f219f7d1a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 876372678256..e1318faa9ebf 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); }