mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
backlight: pwm_bl: fix the state check in power-off
If the default-brightness-level is 0 and related pwm has been enabled in uboot, the pwm_backlight may not actually be turned off. Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: I92c0c363a13040e300dd8aa2d40edcad87fa50d0
This commit is contained in:
@@ -74,7 +74,7 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb)
|
||||
struct pwm_state state;
|
||||
|
||||
pwm_get_state(pb->pwm, &state);
|
||||
if (!pb->enabled)
|
||||
if (!pb->enabled && !state.enabled)
|
||||
return;
|
||||
|
||||
if (pb->enable_gpio)
|
||||
|
||||
Reference in New Issue
Block a user