Fix: NULL pointer dereference of THIS_MODULE with built-in modules
[lttng-modules.git] / probes / Kbuild
index afa3076e07c1c7e6c84786b2358ebfd90cc994d3..a4f6b32af172bedfba2b1a443b7b94d7d82b27bc 100644 (file)
@@ -12,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),)
@@ -138,19 +143,11 @@ ifneq ($(CONFIG_SCSI),)
       echo "lttng-probe-scsi.o" ; fi;)
 endif # CONFIG_SCSI
 
-vmscan = $(shell \
+obj-$(CONFIG_LTTNG) += $(shell \
   if [ $(VERSION) -ge 3 \
     -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \
     echo "lttng-probe-vmscan.o" ; fi;)
 
-ifneq ($(CONFIG_SWAP),)
-  obj-$(CONFIG_LTTNG) += $(vmscan)
-else
-  ifneq ($(CONFIG_CGROUP_MEM_RES_CTLR),)
-    obj-$(CONFIG_LTTNG) += $(vmscan)
-  endif # CONFIG_CGROUP_MEM_RES_CTLR
-endif # CONFIG_SWAP
-
 # lock probe does not work, so disabling it for now
 #ifneq ($(CONFIG_LOCKDEP),)
 #  obj-$(CONFIG_LTTNG) += lttng-probe-lock.o
@@ -246,7 +243,9 @@ ifneq ($(CONFIG_KALLSYMS_ALL),)
       -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \
       echo "lttng-probe-writeback.o" ; fi;)
 else
-  $(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.)
+  ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
+    $(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.)
+  endif
 endif # CONFIG_KALLSYMS_ALL
 
 ifneq ($(CONFIG_KPROBES),)
This page took 0.024132 seconds and 4 git commands to generate.