if brightness is set 0,thebrightness real set is 0 not min
authorxxx <xxx@rock-chips.com>
Fri, 1 Feb 2013 09:41:21 +0000 (17:41 +0800)
committerxxx <xxx@rock-chips.com>
Fri, 1 Feb 2013 09:41:58 +0000 (17:41 +0800)
drivers/video/backlight/rk29_backlight.c

index d2e2e741d3ca76ac478a434805f903070df031af..fb49a4853754041c9ab56a1a50c7ca397e68b473 100755 (executable)
@@ -158,11 +158,13 @@ static int rk29_bl_update_status(struct backlight_device *bl)
 
        brightness = bl->props.brightness;
 
-       
-       if(rk29_bl_info->brightness_mode==BRIGHTNESS_MODE_LINE)
-               brightness=rk29_bl_val_scalor_line(rk29_bl_info,brightness);
-       else
-               brightness=rk29_bl_val_scalor_conic(rk29_bl_info,brightness);
+       if(brightness)
+       {
+               if(rk29_bl_info->brightness_mode==BRIGHTNESS_MODE_LINE)
+                       brightness=rk29_bl_val_scalor_line(rk29_bl_info,brightness);
+               else
+                       brightness=rk29_bl_val_scalor_conic(rk29_bl_info,brightness);
+       }
        //printk("%s,req brightness=%d,real is=%d\n",__FUNCTION__,bl->props.brightness,brightness);
 
        if (bl->props.power != FB_BLANK_UNBLANK)