regulator: Add devm_regulator_get()

Add a resource managed regulator_get() to simplify regulator
usage in drivers. This allows driver authors to "get and forget"
about their regulators by automatically calling regulator_put()
when the driver is detached.

[Fixed up a couple of coding style issues -- broonie]
Change-Id: Ie32415c3a9f2c4aa99a98b6cb92a784e23d874ea
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Stephen Boyd
2012-01-16 19:39:58 -08:00
parent cbb79ea8a1
commit acf149d4a0
3 changed files with 46 additions and 0 deletions

View File

@@ -266,3 +266,6 @@ IOMAP
pcim_iounmap()
pcim_iomap_table() : array of mapped addresses indexed by BAR
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
REGULATOR
devm_regulator_get()