History

Merge remote-tracking branch 'regulator/topic/constraints' into regulator-linus

Mark Brown committed 12 years ago

Commit 334a8202 parents 67cc688 75bc9641 file · +8 −3Browse files

Unified · Split

drivers/regulator/core.c+8−3
@@ -119,6 +119,11 @@ static const char *rdev_get_name(struct regulator_dev *rdev) · 118 unmodified lines
119119 return "";
120120 }
121121
122+static bool have_full_constraints(void)
123+{
124+ return has_full_constraints || of_have_populated_dt();
125+}
126+
122127 /**
123128 * of_get_regulator - get a regulator device node based on supply name
124129 * @dev: Device pointer for the consumer (of regulator) device
@@ -1340,7 +1345,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, · 1215 unmodified lines
13401345 * Assume that a regulator is physically present and enabled
13411346 * even if it isn't hooked up and just provide a dummy.
13421347 */
1343− if (has_full_constraints && allow_dummy) {
1348+ if (have_full_constraints() && allow_dummy) {
13441349 pr_warn("%s supply %s not found, using dummy regulator\n",
13451350 devname, id);
13461351
@@ -3627,7 +3632,7 @@ int regulator_suspend_finish(void) · 2280 unmodified lines
36273632 if (error)
36283633 ret = error;
36293634 } else {
3630− if (!has_full_constraints)
3635+ if (!have_full_constraints())
36313636 goto unlock;
36323637 if (!ops->disable)
36333638 goto unlock;
@@ -3825,7 +3830,7 @@ static int __init regulator_init_complete(void) · 191 unmodified lines
38253830 if (!enabled)
38263831 goto unlock;
38273832
3828− if (has_full_constraints) {
3833+ if (have_full_constraints()) {
38293834 /* We log since this may kill the system if it
38303835 * goes wrong. */
38313836 rdev_info(rdev, "disabling\n");