diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2010-05-19 07:15:44 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 04:20:16 (GMT) |
commit | 478b3a42bdcd8d1cb57c91cabdc8b6164c639e42 (patch) | |
tree | 78e1c7176589b7308d52d9526ce265df72032a08 | |
parent | 5a2a1848a7d744a437f96b79a655c13b8090e74d (diff) | |
download | linux-fsl-qoriq-478b3a42bdcd8d1cb57c91cabdc8b6164c639e42.tar.xz |
V4L/DVB: ngene: MSI cleanup
MSI cleanup.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/ngene/ngene-core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 2bdcf59..dcf1f45 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c @@ -1300,8 +1300,10 @@ static void ngene_stop(struct ngene *dev) ngwritel(0, NGENE_EVENT); ngwritel(0, NGENE_EVENT_HI); free_irq(dev->pci_dev->irq, dev); +#ifdef CONFIG_PCI_MSI if (dev->msi_enabled) pci_disable_msi(dev->pci_dev); +#endif } static int ngene_start(struct ngene *dev) @@ -1339,7 +1341,7 @@ static int ngene_start(struct ngene *dev) #ifdef CONFIG_PCI_MSI /* enable MSI if kernel and card support it */ - if (dev->card_info->msi_supported) { + if (pci_msi_enabled() && dev->card_info->msi_supported) { ngwritel(0, NGENE_INT_ENABLE); free_irq(dev->pci_dev->irq, dev); stat = pci_enable_msi(dev->pci_dev); @@ -1391,9 +1393,11 @@ static int ngene_start(struct ngene *dev) fail: ngwritel(0, NGENE_INT_ENABLE); free_irq(dev->pci_dev->irq, dev); +#ifdef CONFIG_PCI_MSI fail2: if (dev->msi_enabled) pci_disable_msi(dev->pci_dev); +#endif return stat; } |