lkml.org 
[lkml]   [2007]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fujitsu application panel led value
Use proper encoding for LED values.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

---
Note: earlier code worked because hardware only checks for zero.
--- a/drivers/input/misc/apanel.c 2007-12-12 13:07:03.000000000 -0700
+++ b/drivers/input/misc/apanel.c 2007-12-12 14:42:09.000000000 -0700
@@ -132,11 +132,11 @@ static void mail_led_set(struct led_clas
enum led_brightness value)
{
struct apanel *ap = container_of(led, struct apanel, mail_led);
- if (value)
+
+ if (value != LED_OFF)
ap->led_bits |= 0x8000;
else
ap->led_bits &= ~0x8000;
- ap->led_bits = value;
schedule_work(&ap->led_work);
}


\
 
 \ /
  Last update: 2007-12-12 23:25    [from the cache]
©2003-2011 Jasper Spaans