diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-03-10 09:32:48 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-10 09:34:59 +0000 |
commit | f991525a1acc641a21ece236649ceebfdf2c294d (patch) | |
tree | b91713c27b36869538b15d954dd36e6a1f6a9bb3 /drivers/regulator | |
parent | d016bdc7f4e8b2848d8992f99e226f03abe53716 (diff) | |
download | linux-f991525a1acc641a21ece236649ceebfdf2c294d.tar.bz2 |
regulator: max8907: Remove regulator_dev array from state container
Don't store array of regulator_dev returned by devm_regulator_register()
in state container. It isn't used anywhere outside of
max8907_regulator_probe() function.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max8907-regulator.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index ed90c759c231..9623e9e290bf 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -34,7 +34,6 @@ struct max8907_regulator { struct regulator_desc desc[MAX8907_NUM_REGULATORS]; - struct regulator_dev *rdev[MAX8907_NUM_REGULATORS]; }; #define REG_MBATT() \ @@ -310,6 +309,8 @@ static int max8907_regulator_probe(struct platform_device *pdev) } for (i = 0; i < MAX8907_NUM_REGULATORS; i++) { + struct regulator_dev *rdev; + config.dev = pdev->dev.parent; if (pdata) idata = pdata->init_data[i]; @@ -349,13 +350,13 @@ static int max8907_regulator_probe(struct platform_device *pdev) pmic->desc[i].ops = &max8907_out5v_hwctl_ops; } - pmic->rdev[i] = devm_regulator_register(&pdev->dev, + rdev = devm_regulator_register(&pdev->dev, &pmic->desc[i], &config); - if (IS_ERR(pmic->rdev[i])) { + if (IS_ERR(rdev)) { dev_err(&pdev->dev, "failed to register %s regulator\n", pmic->desc[i].name); - return PTR_ERR(pmic->rdev[i]); + return PTR_ERR(rdev); } } |