From: Roy Novich <royno@nvidia.com>
Subject: [PATCH] BACKPORT: drivers/net/ethernet/mellanox/mlx5/core/devlink.h

Change-Id: Ie5812c36cd8b3c1c6c8196696ace1c11c7c753fa
---
 drivers/net/ethernet/mellanox/mlx5/core/devlink.h | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
@@ -29,16 +29,22 @@ struct mlx5_devlink_trap {
 	struct list_head list;
 };
 
+#ifdef HAVE_DEVLINK_TRAP_SUPPORT
 struct mlx5_core_dev;
 void mlx5_devlink_trap_report(struct mlx5_core_dev *dev, int trap_id, struct sk_buff *skb,
 			      struct devlink_port *dl_port);
 int mlx5_devlink_trap_get_num_active(struct mlx5_core_dev *dev);
 int mlx5_devlink_traps_get_action(struct mlx5_core_dev *dev, int trap_id,
 				  enum devlink_trap_action *action);
+#endif
 
 struct devlink *mlx5_devlink_alloc(struct device *dev);
 void mlx5_devlink_free(struct devlink *devlink);
+#ifdef HAVE_DEVLINK_REGISTER_GET_1_PARAMS
 int mlx5_devlink_register(struct devlink *devlink);
+#else
+int mlx5_devlink_register(struct devlink *devlink, struct device *pdev);
+#endif
 void mlx5_devlink_unregister(struct devlink *devlink);
 
 int
