mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
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>
This commit is contained in:
parent
412d7f4af5
commit
536b43b57b
1 changed files with 7 additions and 0 deletions
|
@ -4563,6 +4563,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",
|
||||
|
|
Loading…
Reference in a new issue