If brightness value was set to anything less than 12, the backlight wasn't
re-enabled after unblanking the display. Closes ticket #2262.

Signed-off-by: Paul Fertser <[email protected]>
---
 arch/arm/mach-s3c2442/mach-gta02.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c2442/mach-gta02.c 
b/arch/arm/mach-s3c2442/mach-gta02.c
index 079a2cc..d16e9d6 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -1027,16 +1027,17 @@ static void gta02_bl_set_intensity(int intensity)
                return;
        }
 
-       old_intensity = pcf50633_reg_read(pcf, PCF50633_REG_LEDOUT);
+       if (!(pcf50633_reg_read(pcf, PCF50633_REG_LEDENA) & 3))
+               old_intensity = 0;
+       else
+               old_intensity = pcf50633_reg_read(pcf, PCF50633_REG_LEDOUT);
+
        if (intensity == old_intensity)
                return;
 
        /* We can't do this anywhere else */
        pcf50633_reg_write(pcf, PCF50633_REG_LEDDIM, 5);
 
-       if (!(pcf50633_reg_read(pcf, PCF50633_REG_LEDENA) & 3))
-               old_intensity = 0;
-
        /*
         * The PCF50633 cannot handle LEDOUT = 0 (datasheet p60)
         * if seen, you have to re-enable the LED unit
-- 
1.5.2.2


Reply via email to