diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-27 08:56:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-27 08:56:21 -0700 |
commit | 30a7266f303f781d5487facff0370f27967f2e46 (patch) | |
tree | a9c3f08b377e8396902858a37ac410afb3e7b854 /drivers | |
parent | c09b5cbd0d88317785de87bcdfe4052f9785c473 (diff) | |
parent | 68feaca0b13e453aa14ee064c1736202b48b342f (diff) | |
download | linux-30a7266f303f781d5487facff0370f27967f2e46.tar.bz2 |
Merge tag 'backlight-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight fix from Lee Jones:
"One simple fix to correctly handle -EPROBE_DEFER"
* tag 'backlight-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
backlight: pwm: Handle EPROBE_DEFER while requesting the PWM
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 3a145a643e0d..6897f1c1bc73 100644 --- 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"); |