aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorGravatar Mark Brown <broonie@linaro.org> 2013-11-27 16:22:53 +0000
committerGravatar Mark Brown <broonie@linaro.org> 2013-11-27 17:13:29 +0000
commit75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6 (patch)
tree9d4fec17cf2caae8766b8fb1a4352fb09561280a /drivers/regulator/core.c
parentregulator: core: Replace checks of have_full_constraints with a function (diff)
downloadlinux-75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6.tar.gz
linux-75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6.tar.bz2
linux-75bc9641cadd2a3f91f9c2e7f2fdfdeb8bd4b1d6.zip
regulator: core: Check for DT every time we check full constraints
Eliminate the gap between DT becoming available and this being used to say we have full constraints by checking directly for DT every time we check for full constraints. This improves interoperaton with optional regulator support. Signed-off-by: Mark Brown <broonie@linaro.org> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 1f314921774d..6a75794ab20d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -121,7 +121,7 @@ static const char *rdev_get_name(struct regulator_dev *rdev)
static bool have_full_constraints(void)
{
- return has_full_constraints;
+ return has_full_constraints || of_have_populated_dt();
}
/**