From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT: drivers/infiniband/hw/mlx5/Makefile

Change-Id: Ia13c46f007115a1fb395f67ef9f02b55b0a71de2
---
 drivers/infiniband/hw/mlx5/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

--- a/drivers/infiniband/hw/mlx5/Makefile
+++ b/drivers/infiniband/hw/mlx5/Makefile
@@ -28,8 +28,11 @@ mlx5_ib-y := ah.o \
 
 mlx5_ib-$(CONFIG_INFINIBAND_ON_DEMAND_PAGING) += odp.o
 mlx5_ib-$(CONFIG_MLX5_ESWITCH) += ib_rep.o
-mlx5_ib-$(CONFIG_INFINIBAND_USER_ACCESS) += devx.o \
-					    fs.o \
-					    qos.o \
-					    std_types.o
+ifneq ($(CONFIG_INFINIBAND_USER_ACCESS),)
+	mlx5_ib-y += devx.o \
+		fs.o \
+		qos.o \
+		std_types.o
+endif
+
 mlx5_ib-$(CONFIG_MLX5_MACSEC) += macsec.o
