]> git.baikalelectronics.ru Git - kernel.git/commit
PM / OPP: Update OPP users to put reference
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Jan 2017 04:41:47 +0000 (10:11 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Jan 2017 08:22:21 +0000 (09:22 +0100)
commit8e3499a4e4f4f15d1e43e327c1493e3c6c9f5402
tree97bc7ee54340bea61c32cc3cf102054ca30f0174
parent28b0b755555fc5339a7a6067e1372932370e500d
PM / OPP: Update OPP users to put reference

This patch updates dev_pm_opp_find_freq_*() routines to get a reference
to the OPPs returned by them.

Also updates the users of dev_pm_opp_find_freq_*() routines to call
dev_pm_opp_put() after they are done using the OPPs.

As it is guaranteed the that OPPs wouldn't get freed while being used,
the RCU read side locking present with the users isn't required anymore.
Drop it as well.

This patch also updates all users of devfreq_recommended_opp() which was
returning an OPP received from the OPP core.

Note that some of the OPP core routines have gained
rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
within them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
15 files changed:
arch/arm/mach-omap2/pm.c
drivers/base/power/opp/core.c
drivers/base/power/opp/cpu.c
drivers/clk/tegra/clk-dfll.c
drivers/cpufreq/exynos5440-cpufreq.c
drivers/cpufreq/imx6q-cpufreq.c
drivers/cpufreq/mt8173-cpufreq.c
drivers/cpufreq/omap-cpufreq.c
drivers/devfreq/devfreq.c
drivers/devfreq/exynos-bus.c
drivers/devfreq/governor_passive.c
drivers/devfreq/rk3399_dmc.c
drivers/devfreq/tegra-devfreq.c
drivers/thermal/cpu_cooling.c
drivers/thermal/devfreq_cooling.c