|
@@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
|
|
|
|
|
|
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
|
|
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
|
|
if (IS_ERR(pb->pwm)) {
|
|
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");
|
|
dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
|
|
pb->legacy = true;
|
|
pb->legacy = true;
|
|
pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
|
|
pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
|