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-Tag: v3.6-rc1~157^2~18 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=361ff5017446605dca8b0a084c826e3d2a0d0a99;p=~emulex%2Finfiniband.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 58a4749c634..7965e86a3fb 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);