]> git.baikalelectronics.ru Git - kernel.git/commit
OPP: Don't return 0 on error from of_get_required_opp_performance_state()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 09:50:56 +0000 (15:20 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:58:12 +0000 (16:28 +0530)
commitc64a3e543328bb4481ffd6cad82c62da875701c2
treee0d847757ce3c478f832202989f31fbf7ee545a5
parent503c1949ca2f3d7a781a9019b6fb3d469bf5876f
OPP: Don't return 0 on error from of_get_required_opp_performance_state()

of_get_required_opp_performance_state() returns 0 on errors currently
and a positive performance state otherwise. Since 0 is a valid
performance state (representing off), it would be better if this routine
returns negative values on error.

That will also make it behave similar to
dev_pm_opp_xlate_performance_state(), which also returns performance
states and returns negative values on error. Change the return type of
the function to "int" in order to return negative values.

This doesn't have any users for now and so no other part of the kernel
will be impacted with this change.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c
include/linux/pm_opp.h