From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT: drivers/net/ethernet/mellanox/mlx5/core/port.c

Change-Id: I688bb8086abeb68bd06ff5ff9f31a74880e29a45
---
 drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -450,6 +450,7 @@ int mlx5_query_module_eeprom(struct mlx5
 }
 EXPORT_SYMBOL_GPL(mlx5_query_module_eeprom);
 
+#ifdef HAVE_GET_MODULE_EEPROM_BY_PAGE
 int mlx5_query_module_eeprom_by_page(struct mlx5_core_dev *dev,
 				     struct mlx5_module_eeprom_query_params *params,
 				     u8 *data)
@@ -469,6 +470,7 @@ int mlx5_query_module_eeprom_by_page(str
 	return mlx5_query_mcia(dev, params, data);
 }
 EXPORT_SYMBOL_GPL(mlx5_query_module_eeprom_by_page);
+#endif
 
 static int mlx5_query_port_pvlc(struct mlx5_core_dev *dev, u32 *pvlc,
 				int pvlc_size,  u8 local_port)
