From: Mark Brown Date: Mon, 7 May 2012 13:14:30 +0000 (+0100) Subject: regulator: Use newly added devres_release() rather than open coding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=361ff5017446605dca8b0a084c826e3d2a0d0a99;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: Liam Girdwood --- 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);