diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2009-01-10 13:54:39 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-04-06 11:06:25 -0400 |
commit | 1bd465e6b0e2b559db47420fea686507a01cfab0 (patch) | |
tree | 623c7a906e4ce117873a33f5b1717e150d5f9e59 /drivers/leds/ledtrig-ide-disk.c | |
parent | a7d878af94b223013a48078e0c8c0a654c24a057 (diff) |
leds: allow led-drivers to use a variable range of brightness values
This patch allows drivers to override the default maximum brightness value
of 255. We take care to preserve backwards-compatibility as much as
possible, so that user-space ABI doesn't change for existing drivers.
LED trigger code has also been updated to use the per-LED maximum.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/leds/ledtrig-ide-disk.c')
-rw-r--r-- | drivers/leds/ledtrig-ide-disk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/ledtrig-ide-disk.c b/drivers/leds/ledtrig-ide-disk.c index 883a577b1b97..ec099fcbcb00 100644 --- a/drivers/leds/ledtrig-ide-disk.c +++ b/drivers/leds/ledtrig-ide-disk.c | |||
@@ -37,7 +37,8 @@ static void ledtrig_ide_timerfunc(unsigned long data) | |||
37 | { | 37 | { |
38 | if (ide_lastactivity != ide_activity) { | 38 | if (ide_lastactivity != ide_activity) { |
39 | ide_lastactivity = ide_activity; | 39 | ide_lastactivity = ide_activity; |
40 | led_trigger_event(ledtrig_ide, LED_FULL); | 40 | /* INT_MAX will set each LED to its maximum brightness */ |
41 | led_trigger_event(ledtrig_ide, INT_MAX); | ||
41 | mod_timer(&ledtrig_ide_timer, jiffies + msecs_to_jiffies(10)); | 42 | mod_timer(&ledtrig_ide_timer, jiffies + msecs_to_jiffies(10)); |
42 | } else { | 43 | } else { |
43 | led_trigger_event(ledtrig_ide, LED_OFF); | 44 | led_trigger_event(ledtrig_ide, LED_OFF); |