One simple fix to correctly handle -EPROBE_DEFER
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVZCmCAAoJEFGvii+H/Hdhc04P/2dEf0zNLVG4ZAHgIlg/xZW7 JJ1EFwsig3yHztzvVaVstYF7fvidbDvNQ1od8MV2kjPF1jdvCcm/cG7Rf2GEdNDs WSKC9Byu42uGFYCfiU58xgBEH9C7P5QsTk5pYpiJGO0bLvXkL1TZOM1pm5chNhdl qx+4DkmmNuFdRLCAIL/GJSMQgYtFwo9BB09lTuzqkYfED8vEccwr8VFqapiTEyks dGJTy0gWm+AvhgrfrdtW/Tm/X7PuWRmPTK2SCL2Li1uMPSUx8sh3hgsBK/hXF4RW 9mvfQSq4GGtrbwYTHobKZpA9z0kh8iZO/ocJgk0AoTc6cdtoHmt9qt7+FdU6im1o +e6MN258Kk9UQGKtRbni8NRAL3lykJhYEIu7m0abv8SNUhFAhrA29CsBNEn7TkXg LCFA7gyf+wkemhu83sVJgwu6Hn09HZg1E2fG8kXZYlDr9Uu9S6RNSwwm/nLOtBFE jNh0vOWv3p0RyoWGpnCVxh1Z5qcgP3CQLfzvpZ5qlChZK4AMnyH/jEzcoNgFNCP/ J+ogKBPDwtOQnTqQa0KkTvIdwiGcgBIN+hgN+MGreJCgFeQ9DEtxXSU8Ph4BCD4y Yk3ymiJGkDDIuCawxqyIaXrbXAtrRyZcZ8MgatVHPmjwGmTJC/DYz8CgxXvLjnGH XVIBI4p+ShXi+xR7xJpj =XfG4 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
30a7266f30
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue