On Mon, May 13, 2013 at 11:25 PM, Johannes Berg
<[email protected]> wrote:
> why not just keep module_exit()?

Sure.

>From e9b18b9f99716fb382e7b8e2cde8248fc82806cf Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <[email protected]>
Date: Wed, 8 May 2013 19:20:55 +0000
Subject: [PATCH v3] backports: make compat module use subsys_initcall()

This is a no-op for the modular use case of the
backports project but by enabling this it allows
for developers a way to embed the backports releases
onto a target source Linux directory, with obvious
pending modifications, by adding our backport_init()
onto the target kernel's init/main.c start_kernel().

Enable this theoretical use case. Hackers welcome to
go play on this theoretical integration strategy now.

Cc: [email protected]
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
 backport/compat/main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/backport/compat/main.c b/backport/compat/main.c
index 90ce751..394e413 100644
--- a/backport/compat/main.c
+++ b/backport/compat/main.c
@@ -1,4 +1,5 @@
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pm_qos.h>
 #include <linux/workqueue.h>
 #include "compat-2.6.34.h"
@@ -69,7 +70,7 @@ static int __init backport_init(void)

         return 0;
 }
-module_init(backport_init);
+subsys_initcall(backport_init);

 static void __exit backport_exit(void)
 {
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to