[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170830111649.GA13000@kroah.com>
Date: Wed, 30 Aug 2017 13:16:49 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: David Miller <davem@...emloft.net>
Cc: devel@...verdev.osuosl.org, netdev@...r.kernel.org,
samuel@...tiz.org, linux-kernel@...r.kernel.org,
kernel test robot <fengguang.wu@...el.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH v3 net-next] staging: irda: fix init level for irda core
When moving the IRDA code out of net/ into drivers/staging/irda/net, the
link order changes when IRDA is built into the kernel. That causes a
kernel crash at boot time as netfilter isn't initialized yet.
To fix this, move the init call level of the irda core to be
device_initcall() as the link order keeps this being initialized at the
correct time.
Reported-by: kernel test robot <fengguang.wu@...el.com>
Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
v3 - just change the initcall level, works so much simpler, thanks to
DaveM for the idea.
v2 - don't force irda to be a module, make the Makefiles put irda back
where it was before in the link order.
drivers/staging/irda/net/irmod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/irda/net/irmod.c b/drivers/staging/irda/net/irmod.c
index c5e35b85c477..4319f4ff66b0 100644
--- a/drivers/staging/irda/net/irmod.c
+++ b/drivers/staging/irda/net/irmod.c
@@ -190,7 +190,7 @@ static void __exit irda_cleanup(void)
*
* Jean II
*/
-subsys_initcall(irda_init);
+device_initcall(irda_init);
module_exit(irda_cleanup);
MODULE_AUTHOR("Dag Brattli <dagb@...uit.no> & Jean Tourrilhes <jt@....hp.com>");
--
2.14.1
Powered by blists - more mailing lists