Skip to content

Commit d450293

Browse files
AxelLinbroonie
authored andcommitted
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>
1 parent e9e7fce commit d450293

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/mt6315-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct mt6315_chip {
4141
.type = REGULATOR_VOLTAGE, \
4242
.id = _bid, \
4343
.owner = THIS_MODULE, \
44-
.n_voltages = 0xbf, \
44+
.n_voltages = 0xc0, \
4545
.linear_ranges = mt_volt_range1, \
4646
.n_linear_ranges = ARRAY_SIZE(mt_volt_range1), \
4747
.vsel_reg = _vsel, \

0 commit comments

Comments
 (0)