diff options
author | Axel Lin <axel.lin@ingics.com> | 2021-03-11 03:05:58 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-11 14:23:21 +0100 |
commit | d450293c55005a3b0a25d209e981ac425483fead (patch) | |
tree | 5d68a83409333e8850c0b03918273d358b6823a3 /drivers/regulator | |
parent | regulator: rt4831: Fix return value check in rt4831_regulator_probe() (diff) | |
download | linux-d450293c55005a3b0a25d209e981ac425483fead.tar.xz linux-d450293c55005a3b0a25d209e981ac425483fead.zip |
regulator: mt6315: Fix off-by-one for .n_voltages
The valid selector is 0 ~ 0xbf, so the .n_voltages should be 0xc0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210311020558.579597-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/mt6315-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index fc7654624dd6..9edc34981ee0 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -41,7 +41,7 @@ struct mt6315_chip { .type = REGULATOR_VOLTAGE, \ .id = _bid, \ .owner = THIS_MODULE, \ - .n_voltages = 0xbf, \ + .n_voltages = 0xc0, \ .linear_ranges = mt_volt_range1, \ .n_linear_ranges = ARRAY_SIZE(mt_volt_range1), \ .vsel_reg = _vsel, \ |