summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps6524x-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-11 08:40:18 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-11 11:16:50 +0200
commit9eb0c4218aa444f863e7f54909351d5b4f0fac06 (patch)
treebcb7413f475d7e67d93d3bb1826f2eb3ef7479b1 /drivers/regulator/tps6524x-regulator.c
parentregulator: Convert anatop to use a struct to pass in regulator runtime config... (diff)
downloadlinux-9eb0c4218aa444f863e7f54909351d5b4f0fac06.tar.xz
linux-9eb0c4218aa444f863e7f54909351d5b4f0fac06.zip
regulator: Convert tps65xxx regulator drivers to use devm_kzalloc
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps6524x-regulator.c')
-rw-r--r--drivers/regulator/tps6524x-regulator.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 6616af7d2956..b88b3df82381 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -595,7 +595,6 @@ static int pmic_remove(struct spi_device *spi)
hw->rdev[i] = NULL;
}
spi_set_drvdata(spi, NULL);
- kfree(hw);
return 0;
}
@@ -614,7 +613,7 @@ static int __devinit pmic_probe(struct spi_device *spi)
return -EINVAL;
}
- hw = kzalloc(sizeof(struct tps6524x), GFP_KERNEL);
+ hw = devm_kzalloc(&spi->dev, sizeof(struct tps6524x), GFP_KERNEL);
if (!hw) {
dev_err(dev, "cannot allocate regulator private data\n");
return -ENOMEM;