summaryrefslogtreecommitdiff
path: root/scripts/coccicheck
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-xscripts/coccicheck12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 1bb1a1bd2daa..823e972149e5 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -10,13 +10,17 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
# OPTIONS=$*
# Workaround for Coccinelle < 0.2.3
- FLAGS="-I $srctree/include -very_quiet"
- shift $(( $# - 1 ))
- OPTIONS=$1
+ FLAGS="-I $srctree/include -very_quiet"
+ shift $(( $# - 1 ))
+ OPTIONS=$1
else
ONLINE=0
FLAGS="-very_quiet"
- OPTIONS="-dir $srctree"
+ if [ "$KBUILD_EXTMOD" = "" ] ; then
+ OPTIONS="-dir $srctree"
+ else
+ OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
+ fi
fi
if [ ! -x "$SPATCH" ]; then