OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9e7fce
)
regulator: mt6315: Fix off-by-one for .n_voltages
author
Axel Lin
<axel.lin@ingics.com>
Thu, 11 Mar 2021 02:05:58 +0000
(10:05 +0800)
committer
Mark Brown
<broonie@kernel.org>
Thu, 11 Mar 2021 13:23:21 +0000
(13:23 +0000)
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>
drivers/regulator/mt6315-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/mt6315-regulator.c
b/drivers/regulator/mt6315-regulator.c
index
fc76546
..
9edc349
100644
(file)
--- 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 = 0x
bf
, \
+ .n_voltages = 0x
c0
, \
.linear_ranges = mt_volt_range1, \
.n_linear_ranges = ARRAY_SIZE(mt_volt_range1), \
.vsel_reg = _vsel, \