drivers: base: opp: add devres support and devm_* functions
authorLukasz Luba <l.luba@partner.samsung.com>
Wed, 23 Jan 2019 17:36:00 +0000 (18:36 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:21 +0000 (14:58 +0900)
commit288b599a7e6c009c428cf0bd8c579bd801076ca1
treee41b74f17c57a8aab2258665088afce9bab23cbd
parent9f68c1c6ee7331d99adc6cef5cd4a5e56b43a1bd
drivers: base: opp: add devres support and devm_* functions

The patch adds basic support for resource tracking in OPP subsystem.
From now, adding a new OPP might be done using devm_pm_opp_add() which
is safe in case of deffer probe.
When the deffer probe is used and the driver does not remove explicitly
the OPP table, it causes warnings for the next try.
With devm_pm_opp_add() the resources are freed and the next deffer probe
is safe.
There is also simple wrapper for dev_pm_opp_remove().

Change-Id: I0b8282e9faf59b34e958853a451f2e7c9a13c18b
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
drivers/base/power/opp/Makefile
drivers/base/power/opp/devres.c [new file with mode: 0644]