leds: pwm: Fix for deferred probe in DT booted mode
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 28 Nov 2013 09:06:38 +0000 (01:06 -0800)
committerBryan Wu <cooloney@gmail.com>
Mon, 2 Dec 2013 19:53:17 +0000 (11:53 -0800)
commitaa1a6d6d74fff31060e08f6007037e6d807c8130
tree9e24e51ae5540d12b9460126fa1616257a71e8be
parentdc1ccc48159d63eca5089e507c82c7d22ef60839
leds: pwm: Fix for deferred probe in DT booted mode

We need to make sure that the error code from devm_of_pwm_get() is the one
the module returns in case of failure.
Restructure the code to make this possible for DT booted case.
With this patch the driver can ask for deferred probing when the board is
booted with DT.
Fixes for example omap4-sdp board's keyboard backlight led.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-pwm.c