diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2010-03-11 13:58:47 -0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-16 19:53:19 +0000 |
commit | 0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db (patch) | |
tree | 805d40439515577d647d825223e051514fdc9e5c /scripts/rt-tester/t3-l1-pi-steal.tst | |
parent | 72dcd8d08aca4ac6154dc37243880ee306c7ea73 (diff) | |
download | kernel_samsung_smdk4412-0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db.zip kernel_samsung_smdk4412-0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db.tar.gz kernel_samsung_smdk4412-0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db.tar.bz2 |
leds-gpio: fix default state handling on OF platforms
The driver wrongly sets default state for LEDs that don't specify
default-state property.
Currently the driver handles default state this way:
memset(&led, 0, sizeof(led));
for_each_child_of_node(np, child) {
state = of_get_property(child, "default-state", NULL);
if (state) {
if (!strcmp(state, "keep"))
led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
...
}
ret = create_gpio_led(&led, ...);
}
Which means that all LEDs that do not specify default-state will inherit
the last value of the default-state property, which is wrong.
This patch fixes the issue by moving LED's template initialization into
the loop body.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'scripts/rt-tester/t3-l1-pi-steal.tst')
0 files changed, 0 insertions, 0 deletions