From patchwork Sat Feb 6 05:45:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kusanagi Kouichi X-Patchwork-Id: 77492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o165k9MV001922 for ; Sat, 6 Feb 2010 05:46:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356Ab0BFFpg (ORCPT ); Sat, 6 Feb 2010 00:45:36 -0500 Received: from msa104.auone-net.jp ([61.117.18.164]:36087 "EHLO msa104.auone-net.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032Ab0BFFpg (ORCPT ); Sat, 6 Feb 2010 00:45:36 -0500 Received: from ppp.dion.ne.jp (ZJ080201.ppp.dion.ne.jp [222.4.80.201]) by msa104.auone-net.jp (au one net msa) with ESMTP id A84CF15C033; Sat, 6 Feb 2010 14:45:34 +0900 (JST) Date: Sat, 6 Feb 2010 14:45:33 +0900 From: Kusanagi Kouichi To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cx23885: Enable Message Signaled Interrupts(MSI). MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Message-Id: <20100206054534.A84CF15C033@msa104.auone-net.jp> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 06 Feb 2010 05:46:09 +0000 (UTC) diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index 0dde57e..7101c51 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -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);