staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 20:43:28 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jan 2014 16:27:11 +0000 (08:27 -0800)
commit 48108fe3daa0d142f9b97178fdb23704ea3a407b upstream.

The dev->irq passed to request_irq() will always be 0 when the auto_attach
function is called. The pcidev->irq should be used instead to get the correct
irq number.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adl_pci9111.c

index 6247fdcedcbf9d7da47f0947fff4c1cae965db1c..71043a1c8500d0a0cdf49621014ac9fbbbfc0f72 100644 (file)
@@ -873,7 +873,7 @@ static int pci9111_auto_attach(struct comedi_device *dev,
        pci9111_reset(dev);
 
        if (pcidev->irq > 0) {
-               ret = request_irq(dev->irq, pci9111_interrupt,
+               ret = request_irq(pcidev->irq, pci9111_interrupt,
                                  IRQF_SHARED, dev->board_name, dev);
                if (ret)
                        return ret;