]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
regulator: core: Check for DT every time we check full constraints
authorMark Brown <broonie@linaro.org>
Wed, 27 Nov 2013 16:22:53 +0000 (16:22 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 27 Nov 2013 17:13:29 +0000 (17:13 +0000)
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>
drivers/regulator/core.c

index 1f314921774d31249384b73336bd232920b07ab6..6a75794ab20dacf818a56112c8f1ebcedc9d57db 100644 (file)
@@ -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();
 }
 
 /**