backlight: as3711_bl: Simplify update_status
authorSam Ravnborg <sam@ravnborg.org>
Sun, 19 Jul 2020 08:07:37 +0000 (10:07 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 20 Jul 2020 09:27:03 +0000 (10:27 +0100)
commit5a09765ddedd34f176275c72ffbe567e428e2dfc
tree068e056f32ef45103974c23ebf73b2e91f0f67f9
parent2144d00ed0db28c764513080f95e4c49ea9133b0
backlight: as3711_bl: Simplify update_status

Replaces the open-coded checks of the state, with the
backlight_get_brightness() helper. This increases readability of the
code and align the functionality across the drivers.

Furthermore drop the debug prints in update_status().
If we need debug printing then we can add it to the backlight core.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/as3711_bl.c