summaryrefslogtreecommitdiff
path: root/drivers/regulator/s2mps11.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-31 14:57:16 +0400
committerMark Brown <broonie@linaro.org>2013-09-17 03:27:54 +0400
commitb707a274455f8f80feab24b999dad9e649c98c9c (patch)
treeaec84bf92717dca64d5615d55027631c6271dc18 /drivers/regulator/s2mps11.c
parentb6b7709cf95c6f5db074f2d725ddf29b0977589f (diff)
downloadlinux-b707a274455f8f80feab24b999dad9e649c98c9c.tar.xz
regulator: s2mps11: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Diffstat (limited to 'drivers/regulator/s2mps11.c')
-rw-r--r--drivers/regulator/s2mps11.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 5eba2ff8c0e8..d7c241e1a173 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -453,28 +453,11 @@ common_reg:
ret = PTR_ERR(s2mps11->rdev[i]);
dev_err(&pdev->dev, "regulator init failed for %d\n",
i);
- s2mps11->rdev[i] = NULL;
- goto err;
+ return ret;
}
}
return 0;
-err:
- for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
- regulator_unregister(s2mps11->rdev[i]);
-
- return ret;
-}
-
-static int s2mps11_pmic_remove(struct platform_device *pdev)
-{
- struct s2mps11_info *s2mps11 = platform_get_drvdata(pdev);
- int i;
-
- for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
- regulator_unregister(s2mps11->rdev[i]);
-
- return 0;
}
static const struct platform_device_id s2mps11_pmic_id[] = {
@@ -489,7 +472,6 @@ static struct platform_driver s2mps11_pmic_driver = {
.owner = THIS_MODULE,
},
.probe = s2mps11_pmic_probe,
- .remove = s2mps11_pmic_remove,
.id_table = s2mps11_pmic_id,
};