Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663596
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] regulator: core: Prioritise consumer mappings over regulator name |
| Date | 2017-06-12 17:20 +0200 |
| Message-ID | <tRzii-3K9-13@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Currently, when looking up a regulator supply, the regulator name
takes priority over the consumer mappings. As there are a lot of
regulator names that are in fairly common use (VDD, MICVDD, etc.) this
can easily lead to obtaining the wrong supply, when a system contains
two regulators that share a name.
The explicit consumer mappings contain much less ambiguity as they
specify both a name and a consumer device. As such prioritise those if
one exists and only fall back to the regulator name if there are no
matching explicit mappings.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 919b7f1..d257952 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1490,8 +1490,6 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
devname = dev_name(dev);
r = regulator_lookup_by_name(supply);
- if (r)
- return r;
mutex_lock(®ulator_list_mutex);
list_for_each_entry(map, ®ulator_map_list, list) {
--
2.1.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] regulator: core: Prioritise consumer mappings over regulator name Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2017-06-12 17:20 +0200
Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name Mark Brown <broonie@kernel.org> - 2017-06-12 18:40 +0200
Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2017-06-13 10:10 +0200
Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name Mark Brown <broonie@kernel.org> - 2017-06-13 12:20 +0200
Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2017-06-13 15:20 +0200
csiph-web