Anton Vorontsov
0493a4ff10
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 >
2010-03-16 19:53:19 +00:00
..
Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
2010-03-14 21:30:17 -04:00
2010-03-08 16:55:37 +01:00
2010-03-07 17:04:50 -08:00
2010-03-07 17:04:52 -08:00
2010-03-12 16:04:50 -08:00
2010-02-27 14:05:38 +01:00
2010-03-13 14:45:49 -08:00
2010-03-06 11:26:28 -08:00
2010-03-07 17:04:49 -08:00
2010-03-07 17:04:49 -08:00
2010-03-08 16:55:37 +01:00
2010-03-12 16:04:50 -08:00
2010-03-12 15:52:40 -08:00
2010-03-06 11:26:32 -08:00
2010-03-07 17:04:52 -08:00
2010-03-07 17:04:49 -08:00
2010-03-07 17:04:48 -08:00
2010-03-12 16:04:50 -08:00
2010-03-08 23:19:15 -08:00
2010-03-06 11:33:09 -08:00
2010-03-14 11:14:58 -07:00
2010-03-04 08:24:06 -08:00
2010-03-12 16:04:50 -08:00
2010-03-13 14:38:31 -08:00
2010-03-14 11:13:54 -07:00
2010-03-08 16:55:37 +01:00
2010-03-16 19:53:19 +00:00
2010-03-09 11:55:27 +11:00
2010-03-07 17:04:49 -08:00
2010-03-14 11:13:54 -07:00
2010-03-08 16:55:37 +01:00
2010-03-12 16:41:09 -08:00
2010-03-14 20:28:39 -07:00
2010-03-12 16:21:24 -08:00
2010-03-12 16:04:50 -08:00
2010-03-13 14:50:18 -08:00
2010-03-07 17:04:49 -08:00
2010-03-08 16:55:37 +01:00
Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
2010-03-14 21:30:17 -04:00
2010-03-12 16:00:54 -08:00
Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
2010-03-14 21:30:17 -04:00
2010-03-14 20:08:38 -04:00
Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
2010-03-14 21:30:17 -04:00
2010-03-12 15:52:43 -08:00
2010-03-07 22:17:08 +01:00
2010-03-14 20:28:39 -07:00
2010-03-13 14:50:18 -08:00
2010-03-13 21:29:38 -08:00
2010-03-12 16:04:50 -08:00
2010-03-08 20:21:04 +00:00
2010-03-08 16:55:37 +01:00
2010-03-07 17:04:48 -08:00
2010-03-07 17:04:51 -08:00
2010-03-12 16:04:50 -08:00
2010-03-12 16:04:50 -08:00
2010-02-28 19:50:33 +02:00
2010-03-13 21:29:38 -08:00
2010-03-02 13:41:14 +02:00
2010-03-12 16:04:50 -08:00
2010-03-08 13:48:01 +00:00
2010-03-07 17:04:49 -08:00
2010-03-06 11:26:28 -08:00
2010-03-08 20:21:04 +00:00