aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/tps65912-spi.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-05-23 11:25:02 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-13 06:11:39 -0400
commitb3fff1770a33abb1905eae2baa8dffd48e5913ae (patch)
tree971a3ba74267bfe4a17319e599bcb3df9ecddbc7 /drivers/mfd/tps65912-spi.c
parentc5fa44d13496eba51ab58ac0d1502825543f51aa (diff)
mfd: tps65912: Convert to managed resources for allocating memory
Saves on code and simplifies the driver, as these resources are now tracked and freed automatically when the driver is realised. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps65912-spi.c')
-rw-r--r--drivers/mfd/tps65912-spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/tps65912-spi.c b/drivers/mfd/tps65912-spi.c
index b45f460d299f..69a5178bf152 100644
--- a/drivers/mfd/tps65912-spi.c
+++ b/drivers/mfd/tps65912-spi.c
@@ -85,7 +85,8 @@ static int tps65912_spi_probe(struct spi_device *spi)
85{ 85{
86 struct tps65912 *tps65912; 86 struct tps65912 *tps65912;
87 87
88 tps65912 = kzalloc(sizeof(struct tps65912), GFP_KERNEL); 88 tps65912 = devm_kzalloc(&spi->dev,
89 sizeof(struct tps65912), GFP_KERNEL);
89 if (tps65912 == NULL) 90 if (tps65912 == NULL)
90 return -ENOMEM; 91 return -ENOMEM;
91 92