From: Mark Brown Date: Fri, 6 Jul 2012 17:19:13 +0000 (+0100) Subject: regulator: core: Mark all DT based boards as having full constraints X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=86f5fcfc3e400b2ac1562cb0fd6aabc9f83ee3e2;p=linux-beck.git regulator: core: Mark all DT based boards as having full constraints Since DT doesn't provide an idiomatic mechanism for enabling full constraints and since it's much more natural with DT to provide them just assume that a DT enabled system has full constraints. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 09a737c868b5..4c53b39b92a6 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3472,6 +3472,15 @@ static int __init regulator_init_complete(void) struct regulation_constraints *c; int enabled, ret; + /* + * Since DT doesn't provide an idiomatic mechanism for + * enabling full constraints and since it's much more natural + * with DT to provide them just assume that a DT enabled + * system has full constraints. + */ + if (of_have_populated_dt()) + has_full_constraints = true; + mutex_lock(®ulator_list_mutex); /* If we have a full configuration then disable any regulators