]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
PM / OPP: Use dev_pm_opp_get_opp_table() instead of _add_opp_table()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Jan 2017 04:41:45 +0000 (10:11 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Jan 2017 08:22:21 +0000 (09:22 +0100)
commitb83c1899a0e98cabd0997531434e1fb3b6574db8
treebbf77ae9fbe1e717bcb4975ed428ec5136367f9d
parent31641cda53dd71c0447fca5e6d42e0e3e8391733
PM / OPP: Use dev_pm_opp_get_opp_table() instead of _add_opp_table()

Migrate all users of _add_opp_table() to use dev_pm_opp_get_opp_table()
to guarantee that the OPP table doesn't get freed while being used.

Also update _managed_opp() to get the reference to the OPP table.

Now that the OPP table wouldn't get freed while these routines are
executing after dev_pm_opp_get_opp_table() is called, there is no need
to take opp_table_lock. Drop them as well.

Now that _add_opp_table(), _remove_opp_table() and the unlocked release
routines aren't used anymore, remove them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp/core.c
drivers/base/power/opp/of.c
drivers/base/power/opp/opp.h