Commit ae3ccc46 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

scripts/checkpatch.pl: device_initcall is not the only __initcall substitute

This patch adds a link to init.h to find appropriate initcall function to
replace obsolete __initcall
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9b3189eb
...@@ -4551,10 +4551,10 @@ sub process { ...@@ -4551,10 +4551,10 @@ sub process {
"$1 is obsolete, use k$3 instead\n" . $herecurr); "$1 is obsolete, use k$3 instead\n" . $herecurr);
} }
# check for __initcall(), use device_initcall() explicitly please # check for __initcall(), use device_initcall() explicitly or more appropriate function please
if ($line =~ /^.\s*__initcall\s*\(/) { if ($line =~ /^.\s*__initcall\s*\(/) {
WARN("USE_DEVICE_INITCALL", WARN("USE_DEVICE_INITCALL",
"please use device_initcall() instead of __initcall()\n" . $herecurr); "please use device_initcall() or more appropriate function instead of __initcall() (see include/linux/init.h)\n" . $herecurr);
} }
# check for various ops structs, ensure they are const. # check for various ops structs, ensure they are const.
......
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