summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorPankaj Kumar <pakuma@codeaurora.org>2012-01-06 15:02:19 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:51:48 -0700
commitfeaafb2b8cc047b02d25edaf3ed4d2869bf5733f (patch)
tree55850f28fcfb7cc4c319c22930e3184a2b3cd71e /scripts/checkpatch.pl
parent1660c32b1a5c09bbcb0b7367424175d617162336 (diff)
checkpatch: Add check for vreg_xxx api in opensource drivers
Vreg API implementation is deprecated. We are using Linux regulator framework now. Hence vreg API should not be used. Change-Id: I8e31dac66592d2d195d190b770a436e93206cf8b Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org> (cherry picked from commit adfb933a24911e3514a2f1b6fe1b1a9151fec56d) Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 972fcf99804b..3eda411c042a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4978,6 +4978,13 @@ sub process {
"Non gpiomux board file cannot have a gpiomux config declarations. Please declare gpiomux configs in board-*-gpiomux.c file.\n" . $herecurr);
}
+# MSM - check if vreg_xxx function are used
+ if ($line =~ /\b(vreg_(get|put|set_level|enable|disable))\b/) {
+ WARN("DEPRECATED_VREG_APIS",
+ "Use of $1 API is deprecated: " .
+ "use regulator APIs\n" . $herecurr);
+ }
+
# unbounded string functions are overflow risks
my %str_fns = (
"sprintf" => "snprintf",