summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2004-10-25 04:19:02 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-25 04:19:02 -0700
commitbf57797ac38b1ecc28461d07f044bf081f7748cb (patch)
tree92a84f377df27fd9110972abeb6b4ceb01a7ae8f /include/linux/module.h
parent39221a1aec5ddb29d2b7b8622477086b4f45f4d0 (diff)
[PATCH] MODULE_PARM must die: make it warn first.
This patch adds a warning whenever MODULE_PARM is used. Successive patches change them over to module_param. Help appreciated! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index f557855b02dd..ac93c8e03b92 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -560,13 +560,15 @@ struct obsolete_modparm {
char type[64-sizeof(void *)];
void *addr;
};
+
+extern void __deprecated MODULE_PARM_(void);
#ifdef MODULE
/* DEPRECATED: Do not use. */
#define MODULE_PARM(var,type) \
struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
-{ __stringify(var), type };
+{ __stringify(var), type, &MODULE_PARM_ };
#else
-#define MODULE_PARM(var,type)
+#define MODULE_PARM(var,type) static void __attribute_unused__ *__parm_##var = &MODULE_PARM_;
#endif
#define __MODULE_STRING(x) __stringify(x)