From 73d0f024c367d6f3a98c37a6ab7448d595490824 Mon Sep 17 00:00:00 2001 From: yzq Date: Mon, 15 Oct 2012 17:38:08 +0800 Subject: [PATCH] backlight: if min_brightness not zero,when suspend,the pwm value not be zero case problem: flash screen when resume. --- drivers/video/backlight/rk29_backlight.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/rk29_backlight.c b/drivers/video/backlight/rk29_backlight.c index f7f4a5a8f20e..3412f2931193 100755 --- a/drivers/video/backlight/rk29_backlight.c +++ b/drivers/video/backlight/rk29_backlight.c @@ -101,6 +101,9 @@ static int rk29_bl_update_status(struct backlight_device *bl) if (suspend_flag) return 0; + if (bl->props.brightness < rk29_bl_info->min_brightness && bl->props.brightness != 0) /*avoid can't view screen when close backlight*/ + brightness = rk29_bl_info->min_brightness; + if (bl->props.power != FB_BLANK_UNBLANK) brightness = 0; @@ -110,9 +113,6 @@ static int rk29_bl_update_status(struct backlight_device *bl) if (bl->props.state & BL_CORE_SUSPENDED) brightness = 0; - if (bl->props.brightness < rk29_bl_info->min_brightness) /*avoid can't view screen when close backlight*/ - brightness = rk29_bl_info->min_brightness; - div_total = read_pwm_reg(id, PWM_REG_LRC); if (ref) { divh = div_total*brightness/BL_STEP; -- 2.34.1