Commit 15253b4a authored by Paul Gortmaker's avatar Paul Gortmaker Committed by David S. Miller

net: strparser: make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

net/strparser/Kconfig:config STREAM_PARSER
net/strparser/Kconfig:  def_bool n

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.  For
clarity, we change the fcn name mod_init to dev_init at the same time.

We replace module.h with init.h and export.h ; the latter since this
file exports some syms.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3557b3fd
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#include <linux/file.h> #include <linux/file.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/init.h>
#include <linux/net.h> #include <linux/net.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/poll.h> #include <linux/poll.h>
...@@ -545,7 +546,7 @@ void strp_check_rcv(struct strparser *strp) ...@@ -545,7 +546,7 @@ void strp_check_rcv(struct strparser *strp)
} }
EXPORT_SYMBOL_GPL(strp_check_rcv); EXPORT_SYMBOL_GPL(strp_check_rcv);
static int __init strp_mod_init(void) static int __init strp_dev_init(void)
{ {
strp_wq = create_singlethread_workqueue("kstrp"); strp_wq = create_singlethread_workqueue("kstrp");
if (unlikely(!strp_wq)) if (unlikely(!strp_wq))
...@@ -553,11 +554,4 @@ static int __init strp_mod_init(void) ...@@ -553,11 +554,4 @@ static int __init strp_mod_init(void)
return 0; return 0;
} }
device_initcall(strp_dev_init);
static void __exit strp_mod_exit(void)
{
destroy_workqueue(strp_wq);
}
module_init(strp_mod_init);
module_exit(strp_mod_exit);
MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment