summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-29 14:25:18 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-03-31 22:56:59 -0400
commiteb0c53771fb2f5f66b0edb3ebce33be4bbf1c285 (patch)
tree1b5d4fd86e4c72482fa07aa6d57ba9f6cab72423 /kernel
parentae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e (diff)
downloadlinux-eb0c53771fb2f5f66b0edb3ebce33be4bbf1c285.tar.bz2
tracing: Fix compile error in module tracepoints when MODULE_UNLOAD not set
If modules are configured in the build but unloading of modules is not, then the refcnt is not defined. Place the get/put module tracepoints under CONFIG_MODULE_UNLOAD since it references this field in the module structure. As a side-effect, this patch also reduces the code when MODULE_UNLOAD is not set, because these unused tracepoints are not created. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 21591ad921f3..d9e237926b69 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -59,8 +59,6 @@
#define CREATE_TRACE_POINTS
#include <trace/events/module.h>
-EXPORT_TRACEPOINT_SYMBOL(module_get);
-
#if 0
#define DEBUGP printk
#else
@@ -467,6 +465,9 @@ MODINFO_ATTR(srcversion);
static char last_unloaded_module[MODULE_NAME_LEN+1];
#ifdef CONFIG_MODULE_UNLOAD
+
+EXPORT_TRACEPOINT_SYMBOL(module_get);
+
/* Init the unload section of the module. */
static void module_unload_init(struct module *mod)
{