projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b787f68
)
backlight: pwm: Handle EPROBE_DEFER while requesting the PWM
author
Nicolas Ferre
<
[email protected]
>
Thu, 19 Feb 2015 09:30:14 +0000
(10:30 +0100)
committer
Lee Jones
<
[email protected]
>
Tue, 26 May 2015 07:44:59 +0000
(08:44 +0100)
When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
flag is not handled properly. It can lead to the PWM not being found.
Signed-off-by: Boris Brezillon <
[email protected]
>
Signed-off-by: Nicolas Ferre <
[email protected]
>
Acked-by: Thierry Reding <
[email protected]
>
Signed-off-by: Lee Jones <
[email protected]
>
drivers/video/backlight/pwm_bl.c
patch
|
blob
|
history
diff --git
a/drivers/video/backlight/pwm_bl.c
b/drivers/video/backlight/pwm_bl.c
index 3a145a643e0d5185146001275b47d3d0cc745454..6897f1c1bc732efe36632895fcedc577b7292a33 100644
(file)
--- a/
drivers/video/backlight/pwm_bl.c
+++ b/
drivers/video/backlight/pwm_bl.c
@@
-274,6
+274,10
@@
static int pwm_backlight_probe(struct platform_device *pdev)
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
if (IS_ERR(pb->pwm)) {
+ ret = PTR_ERR(pb->pwm);
+ if (ret == -EPROBE_DEFER)
+ goto err_alloc;
+
dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
pb->legacy = true;
pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");