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

Change-Id: I592a6a482a7af71e69aa91e41cc4736b021dd746
---
 drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h | 4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h
@@ -16,11 +16,13 @@
  */
 struct mlx5_sf_dev {
 	struct auxiliary_device adev;
+#if !defined(HAVE_AUX_DEV_IRQS_SYSFS) && !defined(CONFIG_AUXILIARY_BUS)
 	struct {
 		struct xarray irqs;
 		struct mutex lock; /* Synchronize irq sysfs creation */
 		bool irq_dir_exists;
 	} sysfs;
+#endif
 	struct mlx5_core_dev *parent_mdev;
 	struct mlx5_core_dev *mdev;
 	phys_addr_t bar_base_addr;
@@ -36,11 +38,13 @@ struct mlx5_sf_dev {
 #endif
 };
 
+#ifdef HAVE_DEVLINK_INSTANCES_RELATIONSHIPS_EXPOSURE
 struct mlx5_sf_peer_devlink_event_ctx {
 	u16 fn_id;
 	struct devlink *devlink;
 	int err;
 };
+#endif
 
 void mlx5_sf_dev_table_create(struct mlx5_core_dev *dev);
 void mlx5_sf_dev_table_destroy(struct mlx5_core_dev *dev);
