aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/ledtrig-timer.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lg@denx.de>2009-01-10 13:54:39 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2009-04-06 11:06:25 -0400
commit1bd465e6b0e2b559db47420fea686507a01cfab0 (patch)
tree623c7a906e4ce117873a33f5b1717e150d5f9e59 /drivers/leds/ledtrig-timer.c
parenta7d878af94b223013a48078e0c8c0a654c24a057 (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-timer.c')
-rw-r--r--drivers/leds/ledtrig-timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
index 3d6531396dda..3b83406de752 100644
--- a/drivers/leds/ledtrig-timer.c
+++ b/drivers/leds/ledtrig-timer.c
@@ -166,7 +166,7 @@ static void timer_trig_activate(struct led_classdev *led_cdev)
166 166
167 timer_data->brightness_on = led_get_brightness(led_cdev); 167 timer_data->brightness_on = led_get_brightness(led_cdev);
168 if (timer_data->brightness_on == LED_OFF) 168 if (timer_data->brightness_on == LED_OFF)
169 timer_data->brightness_on = LED_FULL; 169 timer_data->brightness_on = led_cdev->max_brightness;
170 led_cdev->trigger_data = timer_data; 170 led_cdev->trigger_data = timer_data;
171 171
172 init_timer(&timer_data->timer); 172 init_timer(&timer_data->timer);