a22 backlight: fix bug----bl shine when suspend
authorlyx <lyx@rock-chips.com>
Thu, 2 Jun 2011 01:47:09 +0000 (18:47 -0700)
committerlyx <lyx@rock-chips.com>
Thu, 2 Jun 2011 01:47:40 +0000 (18:47 -0700)
drivers/video/backlight/aw9364_bl.c

index 3884a16b2d2498023d699976a4192eed8bb17e7a..35b05142020e6775b52522f30defa867c3ed785c 100755 (executable)
@@ -81,18 +81,18 @@ static int aw9364_backlight_set(struct backlight_device *bl, int brightness)
                gpio_direction_output(data->pin_en, GPIO_LOW);
                mdelay(3);
        }
-       
-       for(i=0; i<num_clk; i++)
-       {
-               gpio_direction_output(data->pin_en, GPIO_LOW);
-               udelay(5);      
-               gpio_direction_output(data->pin_en, GPIO_HIGH);
-               if(i==0)
-               udelay(50);
-               else 
-               udelay(2);              
+       else {
+               for(i=0; i<num_clk; i++)
+               {
+                       gpio_direction_output(data->pin_en, GPIO_LOW);
+                       udelay(5);      
+                       gpio_direction_output(data->pin_en, GPIO_HIGH);
+                       if(i==0)
+                       udelay(50);
+                       else 
+                       udelay(2);              
+               }
        }
-                       
        DBG("%s:current_bl=%d,bl=%d,num_clk_to=%d,num_clk_from=%d,num_clk=%d\n",__FUNCTION__,
                data->current_brightness,brightness,num_clk_to,num_clk_from,num_clk);