Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
scripts/checkpatch.pl: device_initcall is not the only __initcall sub…
Browse files Browse the repository at this point in the history
…stitute

This patch adds a link to init.h to find appropriate initcall function to
replace obsolete __initcall

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Jun 4, 2014
1 parent 9b3189e commit ae3ccc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4551,10 +4551,10 @@ sub process {
"$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*\(/) {
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.
Expand Down

0 comments on commit ae3ccc4

Please sign in to comment.