diff options
Diffstat (limited to 'arch')
-rw-r--r-- | 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 079a2cc13b7..d16e9d638c1 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 |