aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds/leds-da903x.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-20 09:03:38 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-20 09:03:38 +0100
commit90accd6fabf9b2fa2705945a4c601877a75d43bf (patch)
treed393cb54f0228b1313139e4e14adf4f5cf236b59 /drivers/leds/leds-da903x.c
parentb43d196c4d3fe46d6dda7c987c47792612b80b1b (diff)
parentee2f6cc7f9ea2542ad46070ed62ba7aa04d08871 (diff)
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'drivers/leds/leds-da903x.c')
-rw-r--r--drivers/leds/leds-da903x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds-da903x.c b/drivers/leds/leds-da903x.c
index f1fddb18d70..1f3cc512eff 100644
--- a/drivers/leds/leds-da903x.c
+++ b/drivers/leds/leds-da903x.c
@@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
+#include <linux/workqueue.h>
#include <linux/mfd/da903x.h>
#define DA9030_LED1_CONTROL 0x20
@@ -57,7 +58,7 @@ static void da903x_led_work(struct work_struct *work)
offset = DA9030_LED_OFFSET(led->id);
val = led->flags & ~0x87;
val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */
- val |= (led->new_brightness >> 5) & 0x7; /* PWM<2:0> */
+ val |= (0x7 - (led->new_brightness >> 5)) & 0x7; /* PWM<2:0> */
da903x_write(led->master, DA9030_LED1_CONTROL + offset, val);
break;
case DA9030_ID_VIBRA: