backlight: pwm_bl: fix devicetree parsing with auto-generated
From: Heiko Stuebner <heiko.stuebner@...> Date: Thu, 11 Oct 2018 11:55:38 +0200
Commit-Message
Commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") made the parse-dt function return early when using an auto- generated brightness-table, but didn't take into account that some more settings were handled below the brightness handling, like power-on-delays and also setting the pdata enable-gpio to -EINVAL. This surfaces for example in the case of a backlight without any enable-gpio which then tries to use gpio-0 in error. Fix this by simply moving the trailing settings above the brightness handling. Fixes: 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") Signed-off-by: Heiko Stuebner <heiko.stuebner@...>
Patch-Comment
drivers/video/backlight/pwm_bl.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
Statistics
- 10 lines added
- 9 lines removed