From: Greg Rose Date: Fri, 4 Apr 2014 04:43:16 +0000 (+0000) Subject: i40e: Check PCI_IOV config to avoid compile error X-Git-Tag: v3.16-rc1~27^2~177^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=df805f62d16db15fdb9278bcb56ee3863deebfb8;p=~emulex%2Finfiniband.git i40e: Check PCI_IOV config to avoid compile error 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 Tested-by: Kavindya Deegala Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index e965cc543df..0b34e8b31cb 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -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++;