aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2010-05-19 03:15:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-06-01 00:20:16 -0400
commit478b3a42bdcd8d1cb57c91cabdc8b6164c639e42 (patch)
tree78e1c7176589b7308d52d9526ce265df72032a08 /drivers/media/dvb
parent5a2a1848a7d744a437f96b79a655c13b8090e74d (diff)
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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/ngene/ngene-core.c6
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 2bdcf59829d1..dcf1f45ff07c 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)
1300 ngwritel(0, NGENE_EVENT); 1300 ngwritel(0, NGENE_EVENT);
1301 ngwritel(0, NGENE_EVENT_HI); 1301 ngwritel(0, NGENE_EVENT_HI);
1302 free_irq(dev->pci_dev->irq, dev); 1302 free_irq(dev->pci_dev->irq, dev);
1303#ifdef CONFIG_PCI_MSI
1303 if (dev->msi_enabled) 1304 if (dev->msi_enabled)
1304 pci_disable_msi(dev->pci_dev); 1305 pci_disable_msi(dev->pci_dev);
1306#endif
1305} 1307}
1306 1308
1307static int ngene_start(struct ngene *dev) 1309static int ngene_start(struct ngene *dev)
@@ -1339,7 +1341,7 @@ static int ngene_start(struct ngene *dev)
1339 1341
1340#ifdef CONFIG_PCI_MSI 1342#ifdef CONFIG_PCI_MSI
1341 /* enable MSI if kernel and card support it */ 1343 /* enable MSI if kernel and card support it */
1342 if (dev->card_info->msi_supported) { 1344 if (pci_msi_enabled() && dev->card_info->msi_supported) {
1343 ngwritel(0, NGENE_INT_ENABLE); 1345 ngwritel(0, NGENE_INT_ENABLE);
1344 free_irq(dev->pci_dev->irq, dev); 1346 free_irq(dev->pci_dev->irq, dev);
1345 stat = pci_enable_msi(dev->pci_dev); 1347 stat = pci_enable_msi(dev->pci_dev);
@@ -1391,9 +1393,11 @@ static int ngene_start(struct ngene *dev)
1391fail: 1393fail:
1392 ngwritel(0, NGENE_INT_ENABLE); 1394 ngwritel(0, NGENE_INT_ENABLE);
1393 free_irq(dev->pci_dev->irq, dev); 1395 free_irq(dev->pci_dev->irq, dev);
1396#ifdef CONFIG_PCI_MSI
1394fail2: 1397fail2:
1395 if (dev->msi_enabled) 1398 if (dev->msi_enabled)
1396 pci_disable_msi(dev->pci_dev); 1399 pci_disable_msi(dev->pci_dev);
1400#endif
1397 return stat; 1401 return stat;
1398} 1402}
1399 1403