diff options
author | Mark Brown <broonie@kernel.org> | 2014-12-05 11:06:18 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-05 11:06:18 +0000 |
commit | f291c74a32509d31731bb82cbb26c64cd430805b (patch) | |
tree | c19a8a22880a48a4a4b6eb91ba1a30dd62427f5e /drivers/regulator/qcom_rpm-regulator.c | |
parent | 8b7daad3da2b36f5fe494f5d0c5ef25b33d56b96 (diff) | |
parent | 5e5e3a42c653c5ef1c281651f1882411601129bd (diff) |
Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-sky81452
Conflicts:
drivers/regulator/sky81452-regulator.c
Diffstat (limited to 'drivers/regulator/qcom_rpm-regulator.c')
-rw-r--r-- | drivers/regulator/qcom_rpm-regulator.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c index b55cd5b50ebe..dabd28a359dc 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) { |