Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361323
b: refs/heads/master
c: 54fc403
h: refs/heads/master
i:
  361321: ec4fbc6
  361319: 037d189
v: v3
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed Mar 12, 2013
1 parent 91dc69e commit 85ad643
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd860195a4f9d661754345bd06a3adb30d12d882
refs/heads/master: 54fc4037ac449acf96ab88c3e65633c997df8a84
17 changes: 13 additions & 4 deletions trunk/drivers/mfd/ab8500-gpadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,12 @@ static int ab8500_gpadc_runtime_suspend(struct device *dev)
static int ab8500_gpadc_runtime_resume(struct device *dev)
{
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
int ret;

regulator_enable(gpadc->regu);
return 0;
ret = regulator_enable(gpadc->regu);
if (ret)
dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
return ret;
}

static int ab8500_gpadc_runtime_idle(struct device *dev)
Expand Down Expand Up @@ -643,7 +646,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
}

/* VTVout LDO used to power up ab8500-GPADC */
gpadc->regu = regulator_get(&pdev->dev, "vddadc");
gpadc->regu = devm_regulator_get(&pdev->dev, "vddadc");
if (IS_ERR(gpadc->regu)) {
ret = PTR_ERR(gpadc->regu);
dev_err(gpadc->dev, "failed to get vtvout LDO\n");
Expand All @@ -652,7 +655,11 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, gpadc);

regulator_enable(gpadc->regu);
ret = regulator_enable(gpadc->regu);
if (ret) {
dev_err(gpadc->dev, "Failed to enable vtvout LDO: %d\n", ret);
goto fail_enable;
}

pm_runtime_set_autosuspend_delay(gpadc->dev, GPADC_AUDOSUSPEND_DELAY);
pm_runtime_use_autosuspend(gpadc->dev);
Expand All @@ -663,6 +670,8 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
list_add_tail(&gpadc->node, &ab8500_gpadc_list);
dev_dbg(gpadc->dev, "probe success\n");
return 0;

fail_enable:
fail_irq:
free_irq(gpadc->irq, gpadc);
fail:
Expand Down

0 comments on commit 85ad643

Please sign in to comment.