]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
leds: Fix led-gpio active_low default brightness
authorRaphael Assenat <raph@8d.com>
Sun, 13 Jan 2008 22:55:18 +0000 (22:55 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Thu, 7 Feb 2008 09:52:02 +0000 (09:52 +0000)
When gpio_direction_output() is called, led_dat->active_low is used
as default value. This means that the led will always be off by
default. cdev.brightness should really have been set to LED_OFF
unconditionally to reflect this behavior.

Signed-off-by: Raphael Assenat <raph@8d.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
drivers/leds/leds-gpio.c

index 99bc50059d3531499fa78ca369129a5f7d8c0e39..6c0a9c4761ee13ffd2333db779c7b8f42091ea21 100644 (file)
@@ -85,7 +85,7 @@ static int gpio_led_probe(struct platform_device *pdev)
                led_dat->can_sleep = gpio_cansleep(cur_led->gpio);
                led_dat->active_low = cur_led->active_low;
                led_dat->cdev.brightness_set = gpio_led_set;
-               led_dat->cdev.brightness = cur_led->active_low ? LED_FULL : LED_OFF;
+               led_dat->cdev.brightness = LED_OFF;
 
                ret = gpio_request(led_dat->gpio, led_dat->cdev.name);
                if (ret < 0)