regulator: Implement devm_regulator_free()

Allow consumers to free regulators allocated using devm_regulator_get()
if they need to. This will not normally be required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown
2012-01-20 20:09:18 +00:00
parent 070b907922
commit d5ad34f7cb
2 changed files with 29 additions and 0 deletions

View File

@@ -137,6 +137,7 @@ struct regulator *__must_check devm_regulator_get(struct device *dev,
struct regulator *__must_check regulator_get_exclusive(struct device *dev,
const char *id);
void regulator_put(struct regulator *regulator);
void devm_regulator_free(struct regulator *regulator);
/* regulator output control and status */
int regulator_enable(struct regulator *regulator);