]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Correct default return value for full constraints
authorMark Brown <broonie@linaro.org>
Mon, 27 Jan 2014 17:34:07 +0000 (17:34 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 28 Jan 2014 11:37:43 +0000 (11:37 +0000)
commit01abb68e1cb1b2670edb76c55f6be2303bf6f1fb
tree2365e2bc5aa2267994b153ff95ed77bf9a7560ab
parentaadf31cf39d05674bf0b8f5499895dd8dcb758dc
regulator: core: Correct default return value for full constraints

Once we have full constraints then all supply mappings should be known to
the regulator API. This means that we should treat failed lookups as fatal
rather than deferring in the hope of further registrations but this was
broken by commit 5db7195d00d6d838 "regulator: core: Fix default return
value for _get()" which was targeted at DT systems but unintentionally
broke non-DT systems by changing the default return value.

Fix this by explicitly returning -EPROBE_DEFER from the DT lookup if we
find a property but no corresponding regulator and by having the non-DT
case default to -ENODEV when we have full constraints.

Fixes: 5db7195d00d6d838 "regulator: core: Fix default return value for _get()"
Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
drivers/regulator/core.c