regulator: Use newly added devres_release() rather than open coding
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 7 May 2012 13:14:30 +0000 (14:14 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 12:20:12 +0000 (13:20 +0100)
devres_release() will call the destructor for the resource as well as
freeing the devres data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
drivers/regulator/core.c

index 58a4749c6347f9c415b9b6f4bee5527adcabd1d5..7965e86a3fbbc09b64a8558a6a1aa44a0f6b09ae 100644 (file)
@@ -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);