led: gpio: Properly deal with deferred probing
GPIO LEDs can suffer from deferred probing due to failing gpio request.
Instead of registering each gpio led independently, pre-allocate an
array of struct gpio_led for all and tear it down properly if probing
of one leds fails. While at it, silence error messages on -EPROBE_DEFER.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c6a9698 commit 62adc52ed513e3080e2be6a233de4e06a90d1042
@Sebastian Hesselbarth Sebastian Hesselbarth authored on 14 Apr 2015
Sascha Hauer committed on 17 Apr 2015
Showing 1 changed file
View
drivers/led/led-gpio.c