From: Mathieu Desnoyers Date: Fri, 7 Oct 2016 14:55:16 +0000 (-0400) Subject: Fix: i2c: support kernels < 3.15 X-Git-Tag: v2.9.0-rc1~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a918229e4ebb0e6e415b37472c689ec4c6a736e8;p=lttng-modules.git Fix: i2c: support kernels < 3.15 i2c instrumentation has only been added in kernel 3.15. Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/Kbuild b/probes/Kbuild index bd35bd75..2afb6dd2 100644 --- a/probes/Kbuild +++ b/probes/Kbuild @@ -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),)