[RTnet-developers] [PATCH] rt_igb: Add missing ifdefs for CONFIG_PCI_MSI
Brought to you by:
bet-frogger,
kiszka
|
From: Sebastian S. <sm...@rt...> - 2011-01-06 15:53:18
|
When building rt_igb for a kernel without CONFIG_PCI_MSI set the calls to
igb_reset_interrupt_capability() and igb_set_interrupt_capability() lead
to a compilation error because those functions are only known when
CONFIG_PCI_MSI is set to y. Therefore this patch makes the calls to those
functions conditional, too.
Signed-off-by: Sebastian Smolorz <sm...@rt...>
---
drivers/igb/igb_main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/igb/igb_main.c b/drivers/igb/igb_main.c
index aca794e..2487aeb 100644
--- a/drivers/igb/igb_main.c
+++ b/drivers/igb/igb_main.c
@@ -1568,8 +1568,9 @@ static void __devexit igb_remove(struct pci_dev *pdev)
igb_reset_phy(&adapter->hw);
igb_remove_device(&adapter->hw);
+#ifdef CONFIG_PCI_MSI
igb_reset_interrupt_capability(adapter);
-
+#endif
igb_free_queues(adapter);
rtskb_pool_release(&adapter->skb_pool);
@@ -1625,8 +1626,9 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
/* This call may decrease the number of queues depending on
* interrupt mode. */
+#ifdef CONFIG_PCI_MSI
igb_set_interrupt_capability(adapter);
-
+#endif
if (igb_alloc_queues(adapter)) {
dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
return -ENOMEM;
--
1.7.0.4
|