aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <[email protected]>2012-05-07 14:14:30 +0100
committerMark Brown <[email protected]>2012-06-03 13:20:12 +0100
commit361ff5017446605dca8b0a084c826e3d2a0d0a99 (patch)
tree22a0112fa7ce6a1091ff607d1acbdbea2c7b9c50
parent8b7485ef623b9171e5a58c67eef5912a27db5822 (diff)
regulator: Use newly added devres_release() rather than open coding
devres_release() will call the destructor for the resource as well as freeing the devres data. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 58a4749c6347..7965e86a3fbb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1459,7 +1459,7 @@ void devm_regulator_put(struct regulator *regulator)
{
int rc;
- rc = devres_destroy(regulator->dev, devm_regulator_release,
+ rc = devres_release(regulator->dev, devm_regulator_release,
devm_regulator_match, regulator);
if (rc == 0)
regulator_put(regulator);