summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/qcom_rpm-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-26 19:42:41 +0000
committerMark Brown <broonie@kernel.org>2014-11-26 19:42:41 +0000
commitf9fbc21d03d719a10cbffe19870092592bf60d56 (patch)
tree3f0ed48bd94d1957bd03fbebdc9779270840adc8 /drivers/regulator/qcom_rpm-regulator.c
parenta26ed45c912d46cedac5f15c2872aa7e462fcdf1 (diff)
parent5e5e3a42c653c5ef1c281651f1882411601129bd (diff)
downloadop-kernel-dev-f9fbc21d03d719a10cbffe19870092592bf60d56.zip
op-kernel-dev-f9fbc21d03d719a10cbffe19870092592bf60d56.tar.gz
Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-max77802
Diffstat (limited to 'drivers/regulator/qcom_rpm-regulator.c')
-rw-r--r--drivers/regulator/qcom_rpm-regulator.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
index b55cd5b..dabd28a 100644
--- a/drivers/regulator/qcom_rpm-regulator.c
+++ b/drivers/regulator/qcom_rpm-regulator.c
@@ -643,10 +643,6 @@ static int rpm_reg_probe(struct platform_device *pdev)
match = of_match_device(rpm_of_match, &pdev->dev);
template = match->data;
- initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node);
- if (!initdata)
- return -EINVAL;
-
vreg = devm_kmalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL);
if (!vreg) {
dev_err(&pdev->dev, "failed to allocate vreg\n");
@@ -666,6 +662,11 @@ static int rpm_reg_probe(struct platform_device *pdev)
return -ENODEV;
}
+ initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node,
+ &vreg->desc);
+ if (!initdata)
+ return -EINVAL;
+
key = "reg";
ret = of_property_read_u32(pdev->dev.of_node, key, &val);
if (ret) {
OpenPOWER on IntegriCloud