Message ID | 20211004192741.621870-4-marijn.suijten@somainline.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | backlight: qcom-wled: fix and solidify handling of enabled-strings | expand |
On Mon, Oct 04, 2021 at 09:27:34PM +0200, Marijn Suijten wrote: > DT-bindings do not specify num-strings as mandatory property, yet it is > required to be specified even if enabled-strings is used. The length of > that property-array should already be enough to determine exactly which > and how many strings to enable. > > Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c index 9927ed98944a..29910e603c42 100644 --- a/drivers/video/backlight/qcom-wled.c +++ b/drivers/video/backlight/qcom-wled.c @@ -1536,6 +1536,8 @@ static int wled_configure(struct wled *wled) string_len, rc); return -EINVAL; } + + cfg->num_strings = string_len; } return 0;