Fix: i2c: support kernels < 3.15
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 Oct 2016 14:55:16 +0000 (10:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 Oct 2016 14:55:16 +0000 (10:55 -0400)
i2c instrumentation has only been added in kernel 3.15.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Kbuild

index bd35bd75c6c57ea3d5f011ee735eeab7f9f61b01..2afb6dd26d091cc5f489afbca9108f2bc31e1742 100644 (file)
@@ -5,7 +5,6 @@ include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
 ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
 
 obj-$(CONFIG_LTTNG) += lttng-probe-sched.o
-obj-$(CONFIG_LTTNG) += lttng-probe-i2c.o
 obj-$(CONFIG_LTTNG) += lttng-probe-irq.o
 obj-$(CONFIG_LTTNG) += lttng-probe-timer.o
 obj-$(CONFIG_LTTNG) += lttng-probe-kmem.o
@@ -13,6 +12,11 @@ obj-$(CONFIG_LTTNG) += lttng-probe-module.o
 obj-$(CONFIG_LTTNG) += lttng-probe-power.o
 obj-$(CONFIG_LTTNG) += lttng-probe-statedump.o
 
+i2c_dep = $(srctree)/include/trace/events/i2c.h
+ifneq ($(wildcard $(i2c_dep)),)
+  obj-$(CONFIG_LTTNG) += lttng-probe-i2c.o
+endif
+
 ifneq ($(CONFIG_KVM),)
   obj-$(CONFIG_LTTNG) += lttng-probe-kvm.o
   ifneq ($(CONFIG_X86),)
This page took 0.026312 seconds and 4 git commands to generate.