aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm8994-regulator.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-24 07:29:58 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-24 07:29:58 -0400
commit511f1cb6d426938fabf9c6d69ce4861b66ffd919 (patch)
tree88fd9b5c15ccb42d5d582f83e87ce5d3f16127cb /drivers/regulator/wm8994-regulator.c
parentf907ab06bb021bcb91d39c8d1b36536ebdb318fa (diff)
parent4992fa1fd425f1934f503ffa96b68e235b89db9a (diff)
Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into next/drivers
The pxa regulator branch removes the bq24022 driver, while a lot of other regulator drivers got added in the regulator tree. This resolves the trivial conflicts by merging in the regulator patches that are already merged into v3.4. Conflicts: drivers/regulator/Kconfig drivers/regulator/Makefile Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/regulator/wm8994-regulator.c')
-rw-r--r--drivers/regulator/wm8994-regulator.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 435e335d6e6..75ed402d9f4 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -241,7 +241,7 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
241 if (!pdata) 241 if (!pdata)
242 return -ENODEV; 242 return -ENODEV;
243 243
244 ldo = kzalloc(sizeof(struct wm8994_ldo), GFP_KERNEL); 244 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL);
245 if (ldo == NULL) { 245 if (ldo == NULL) {
246 dev_err(&pdev->dev, "Unable to allocate private data\n"); 246 dev_err(&pdev->dev, "Unable to allocate private data\n");
247 return -ENOMEM; 247 return -ENOMEM;
@@ -285,7 +285,6 @@ err_gpio:
285 if (gpio_is_valid(ldo->enable)) 285 if (gpio_is_valid(ldo->enable))
286 gpio_free(ldo->enable); 286 gpio_free(ldo->enable);
287err: 287err:
288 kfree(ldo);
289 return ret; 288 return ret;
290} 289}
291 290
@@ -298,7 +297,6 @@ static __devexit int wm8994_ldo_remove(struct platform_device *pdev)
298 regulator_unregister(ldo->regulator); 297 regulator_unregister(ldo->regulator);
299 if (gpio_is_valid(ldo->enable)) 298 if (gpio_is_valid(ldo->enable))
300 gpio_free(ldo->enable); 299 gpio_free(ldo->enable);
301 kfree(ldo);
302 300
303 return 0; 301 return 0;
304} 302}