summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2017-10-13 19:37:31 +0300
committerMark Brown <broonie@kernel.org>2017-10-18 11:23:21 +0100
commitd824c7a8e88a7162d14782e73a6a6c867a266500 (patch)
treeb1cef285b065208b0d9d81c7760b96cf502bbe14 /drivers/regulator
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
regulator: rn5t618: Do not index regulator_desc arrays by id
The regulator_desc arrays in this driver are indexed by RN5T618_* constants and some elements can be missing. This causes probe failures on older models: rn5t618-regulator rn5t618-regulator: failed to register (null) regulator rn5t618-regulator: probe of rn5t618-regulator failed with error -22 Fix this by making the arrays flat. This also saves a little memory because the regulator_desc arrays become smaller. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Fixes: 83b2a3c2ab24 ("regulator: rn5t618: add RC5T619 PMIC support") Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/rn5t618-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/rn5t618-regulator.c b/drivers/regulator/rn5t618-regulator.c
index ef2be56460fe..790a4a73ea2c 100644
--- a/drivers/regulator/rn5t618-regulator.c
+++ b/drivers/regulator/rn5t618-regulator.c
@@ -29,7 +29,7 @@ static const struct regulator_ops rn5t618_reg_ops = {
};
#define REG(rid, ereg, emask, vreg, vmask, min, max, step) \
- [RN5T618_##rid] = { \
+ { \
.name = #rid, \
.of_match = of_match_ptr(#rid), \
.regulators_node = of_match_ptr("regulators"), \