diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-09-20 22:06:34 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-22 18:18:59 -0700 |
commit | 0d90ecf31e11f8204649943ed3478d7a015c2cb9 (patch) | |
tree | 15aeee31b2937d44fbac4985c588aee1d4064b4f /drivers/regulator/axp20x-regulator.c | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) | |
download | op-kernel-dev-0d90ecf31e11f8204649943ed3478d7a015c2cb9.zip op-kernel-dev-0d90ecf31e11f8204649943ed3478d7a015c2cb9.tar.gz |
regulator: axp20x: Use parent device as regulator configuration device
The current device used for the regulator configuration is the child device
created by the MFD driver. This means that it doesn't have any of_node pointing
to it, and whenever we register the regulators, it will not look into the
regulator supply in the DT, hence requiring to provide regulator aliases in the
MFD driver.
We can easily fix that by using the parent device in our configuration, which
has a DT node associated to it, and will allow a DT lookup. Eventually, we will
be able to remove the aliases in the MFD driver.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/axp20x-regulator.c')
-rw-r--r-- | drivers/regulator/axp20x-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index 004aadb..2e1010a 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -245,7 +245,7 @@ static int axp20x_regulator_probe(struct platform_device *pdev) for (i = 0; i < AXP20X_REG_ID_MAX; i++) { init_data = axp20x_matches[i].init_data; - config.dev = &pdev->dev; + config.dev = pdev->dev.parent; config.init_data = init_data; config.regmap = axp20x->regmap; config.of_node = axp20x_matches[i].of_node; |