summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2018-12-19 16:58:04 +0800
committerMark Brown <broonie@kernel.org>2018-12-20 14:38:27 +0000
commitf4c8f980283b4832dad4d9ff4d5ecb3d7763efae (patch)
tree19ce211f412b889a94db75358bcbf57a8b5c23f1 /drivers/regulator
parent4906d09164c00979dcbb28060231d9ce46ab2061 (diff)
regulator: mcp16502: Fix missing n_voltages setting
The n_voltages setting is not set, fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/mcp16502.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index cb11fb206899..3479ae009b0b 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -90,6 +90,7 @@ static unsigned int mcp16502_of_map_mode(unsigned int mode)
.ops = &(_ops), \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
+ .n_voltages = MCP16502_VSEL + 1, \
.linear_ranges = _ranges, \
.n_linear_ranges = ARRAY_SIZE(_ranges), \
.of_match = of_match_ptr(_name), \