diff options
| -rw-r--r-- | drivers/regulator/core.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6382f0af353b..1f314921774d 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -119,6 +119,11 @@ static const char *rdev_get_name(struct regulator_dev *rdev) | |||
| 119 | return ""; | 119 | return ""; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static bool have_full_constraints(void) | ||
| 123 | { | ||
| 124 | return has_full_constraints; | ||
| 125 | } | ||
| 126 | |||
| 122 | /** | 127 | /** |
| 123 | * of_get_regulator - get a regulator device node based on supply name | 128 | * of_get_regulator - get a regulator device node based on supply name |
| 124 | * @dev: Device pointer for the consumer (of regulator) device | 129 | * @dev: Device pointer for the consumer (of regulator) device |
| @@ -1340,7 +1345,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, | |||
| 1340 | * Assume that a regulator is physically present and enabled | 1345 | * Assume that a regulator is physically present and enabled |
| 1341 | * even if it isn't hooked up and just provide a dummy. | 1346 | * even if it isn't hooked up and just provide a dummy. |
| 1342 | */ | 1347 | */ |
| 1343 | if (has_full_constraints && allow_dummy) { | 1348 | if (have_full_constraints() && allow_dummy) { |
| 1344 | pr_warn("%s supply %s not found, using dummy regulator\n", | 1349 | pr_warn("%s supply %s not found, using dummy regulator\n", |
| 1345 | devname, id); | 1350 | devname, id); |
| 1346 | 1351 | ||
| @@ -3624,7 +3629,7 @@ int regulator_suspend_finish(void) | |||
| 3624 | if (error) | 3629 | if (error) |
| 3625 | ret = error; | 3630 | ret = error; |
| 3626 | } else { | 3631 | } else { |
| 3627 | if (!has_full_constraints) | 3632 | if (!have_full_constraints()) |
| 3628 | goto unlock; | 3633 | goto unlock; |
| 3629 | if (!ops->disable) | 3634 | if (!ops->disable) |
| 3630 | goto unlock; | 3635 | goto unlock; |
| @@ -3822,7 +3827,7 @@ static int __init regulator_init_complete(void) | |||
| 3822 | if (!enabled) | 3827 | if (!enabled) |
| 3823 | goto unlock; | 3828 | goto unlock; |
| 3824 | 3829 | ||
| 3825 | if (has_full_constraints) { | 3830 | if (have_full_constraints()) { |
| 3826 | /* We log since this may kill the system if it | 3831 | /* We log since this may kill the system if it |
| 3827 | * goes wrong. */ | 3832 | * goes wrong. */ |
| 3828 | rdev_info(rdev, "disabling\n"); | 3833 | rdev_info(rdev, "disabling\n"); |
