i40e: Check PCI_IOV config to avoid compile error
authorGreg Rose <gregory.v.rose@intel.com>
Fri, 4 Apr 2014 04:43:16 +0000 (04:43 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 21 May 2014 11:01:30 +0000 (04:01 -0700)
The call to i40e_alloc_vfs needs to be wrapped in CONFIG_PCI_IOV because
the function itself is wrapped in the same conditional compile block.

Change-ID: I663c5f1b85e5cfba0b36da8966f7db1a034f408b
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index e965cc543df1b85abf32a6d4b51ae4187e727f09..0b34e8b31cbdd64c8f7eff7d7f5cfe3cee336df2 100644 (file)
@@ -8368,6 +8368,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                }
        }
 
+#ifdef CONFIG_PCI_IOV
        /* prep for VF support */
        if ((pf->flags & I40E_FLAG_SRIOV_ENABLED) &&
            (pf->flags & I40E_FLAG_MSIX_ENABLED) &&
@@ -8390,6 +8391,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                                         err);
                }
        }
+#endif /* CONFIG_PCI_IOV */
 
        pfs_found++;