From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT: include/linux/mlx5/device.h

Change-Id: I14c0cdf2fd9924f37b62ee8e62f1b49f003a63ce
---
 include/linux/mlx5/device.h | 4 ++++
 1 file changed, 4 insertions(+)

--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -33,6 +33,8 @@
 #ifndef MLX5_DEVICE_H
 #define MLX5_DEVICE_H
 
+#include "../../../compat/config.h"
+
 #include <linux/types.h>
 #include <rdma/ib_verbs.h>
 #include <linux/mlx5/mlx5_ifc.h>
@@ -377,7 +379,9 @@ enum mlx5_driver_event {
 	MLX5_DRIVER_EVENT_UPLINK_NETDEV,
 	MLX5_DRIVER_EVENT_MACSEC_SA_ADDED,
 	MLX5_DRIVER_EVENT_MACSEC_SA_DELETED,
+#ifdef HAVE_DEVLINK_INSTANCES_RELATIONSHIPS_EXPOSURE
 	MLX5_DRIVER_EVENT_SF_PEER_DEVLINK,
+#endif
 	MLX5_DRIVER_EVENT_AFFILIATION_DONE,
 	MLX5_DRIVER_EVENT_AFFILIATION_REMOVED,
 };
