net: bpfilter: dont use module_init in non-modular code

The Kconfig controlling this code is:

bpfilter/Kconfig:menuconfig BPFILTER
bpfilter/Kconfig:   bool "BPF based packet filtering framework (BPFILTER)"

Since it isn't a module, we shouldn't use module_init().  Instead we
use device_initcall() - which is exactly what module_init() defaults
to for non-modular code/builds.

We don't remove <linux/module.h> from the includes since this file does
a request_module() and hence is a valid user of that header file, even
though it is not modular itself.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Paul Gortmaker 2019-04-20 23:29:47 -04:00 коммит произвёл David S. Miller
Родитель 9628495d50
Коммит 3557b3fdee
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -77,5 +77,4 @@ static int __init bpfilter_sockopt_init(void)
return 0;
}
module_init(bpfilter_sockopt_init);
device_initcall(bpfilter_sockopt_init);