Fix: regmap build against kernel 4.0 kernel headers
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 22:58:51 +0000 (18:58 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 22:59:32 +0000 (18:59 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Makefile

index d4baaeb204ab3cdfb65ebca56555c6e6c3910c1b..3272b9f82f0ca340c2df5377c27a500c82ed068c 100644 (file)
@@ -192,14 +192,29 @@ obj-m +=  $(shell \
                echo "lttng-probe-rcu.o" ; fi;)
 
 ifneq ($(CONFIG_REGMAP),)
-regmap_dep = $(srctree)/drivers/base/regmap/trace.h $(srctree)/include/trace/events/regmap.h
-ifneq ($(wildcard $(regmap_dep)),)
+regmap_dep_3_x = $(srctree)/include/trace/events/regmap.h
+regmap_dep_4_0 = $(srctree)/drivers/base/regmap/internal.h
+regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h
+
+ifneq ($(wildcard $(regmap_dep_4_1)),)
 obj-m +=  $(shell \
-       if [ $(VERSION) -ge 4 \
-               -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \
+       if [ $(VERSION) -ge 5 \
+               -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 1 \) ] ; then \
+               echo "lttng-probe-regmap.o" ; fi;)
+else
+ifneq ($(wildcard $(regmap_dep_4_0)),)
+obj-m +=  $(shell \
+       if [ $(VERSION) -eq 4 -a $(PATCHLEVEL) -eq 0 ] ; then \
                echo "lttng-probe-regmap.o" ; fi;)
 else
-$(warning Either of files { $(regmap_dep) } not found. Probe "regmap" is disabled. Use full kernel source tree to enable it.)
+ifneq ($(wildcard $(regmap_dep_3_x)),)
+obj-m +=  $(shell \
+       if [ $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 ] ; then \
+               echo "lttng-probe-regmap.o" ; fi;)
+else
+$(warning Either of files $(regmap_dep_4_1), $(regmap_dep_4_0), or $(regmap_dep_3_x) not found. Probe "regmap" is disabled. Use full kernel source tree to enable it.)
+endif
+endif
 endif
 endif
 
This page took 0.026939 seconds and 4 git commands to generate.