[PATCH 1/3] compat: redefine core_initcall() and late_initcall()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx>

It is questionable if we'd want to backport calls declared
through late_initcall() or core_initcall() on the kernel
but if this ends up being desired the current of copying
kernel code requires either patching or redefining these
symbols to make them build.

To avoid having to maintain patches for these components
and having to delcare these routines on header files through
compat manually use these init macros to help us define
symbols we *can* use on the compat module init.

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx>
---
 backport/include/linux/compat-2.6.h |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/backport/include/linux/compat-2.6.h b/backport/include/linux/compat-2.6.h
index 57a1c13..109afd4 100644
--- a/backport/include/linux/compat-2.6.h
+++ b/backport/include/linux/compat-2.6.h
@@ -18,6 +18,21 @@
 #include <linux/init.h>
 #include <linux/uidgid.h>
 
+#define backport_init_sym(fn) extern void backport_##fn(void);
+#define backport_init_call(fn) backport_##fn()
+
+#define backport_initcall(fn)			\
+	void backport_##fn(void)		\
+	{					\
+		fn();				\
+	}
+
+#undef core_initcall
+#undef late_initcall
+
+#define core_initcall	backport_initcall
+#define late_initcall	backport_initcall
+
 /*
  * The define overwriting module_init is based on the original module_init
  * which looks like this:
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux