]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
V4L/DVB: cx23885: Enable Message Signaled Interrupts(MSI)
authorKusanagi Kouichi <slash@ac.auone-net.jp>
Sat, 6 Feb 2010 05:45:33 +0000 (02:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 18:34:59 +0000 (15:34 -0300)
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-core.c

index 161ae7316c955abc7d6fa1a335056a2ee966ef6a..ff76f64edac1e196f8c276e543fff216669cc445 100644 (file)
@@ -1953,8 +1953,12 @@ static int __devinit cx23885_initdev(struct pci_dev *pci_dev,
                goto fail_irq;
        }
 
-       err = request_irq(pci_dev->irq, cx23885_irq,
-                         IRQF_SHARED | IRQF_DISABLED, dev->name, dev);
+       if (!pci_enable_msi(pci_dev))
+               err = request_irq(pci_dev->irq, cx23885_irq,
+                                 IRQF_DISABLED, dev->name, dev);
+       else
+               err = request_irq(pci_dev->irq, cx23885_irq,
+                                 IRQF_SHARED | IRQF_DISABLED, dev->name, dev);
        if (err < 0) {
                printk(KERN_ERR "%s: can't get IRQ %d\n",
                       dev->name, pci_dev->irq);
@@ -2000,6 +2004,7 @@ static void __devexit cx23885_finidev(struct pci_dev *pci_dev)
 
        /* unregister stuff */
        free_irq(pci_dev->irq, dev);
+       pci_disable_msi(pci_dev);
 
        cx23885_dev_unregister(dev);
        v4l2_device_unregister(v4l2_dev);