Skip to content

Commit 5a7fbe4

Browse files
Uwe Kleine-Königlag-linaro
authored andcommitted
backlight: pwm_bl: Drop support for legacy PWM probing
There is no in-tree user left which relies on legacy probing. So drop support for it which removes another user of the deprecated pwm_request() function. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 901ae53 commit 5a7fbe4

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

drivers/video/backlight/pwm_bl.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ struct pwm_bl_data {
2828
struct regulator *power_supply;
2929
struct gpio_desc *enable_gpio;
3030
unsigned int scale;
31-
bool legacy;
3231
unsigned int post_pwm_on_delay;
3332
unsigned int pwm_off_delay;
3433
int (*notify)(struct device *,
@@ -455,7 +454,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
455454
struct platform_pwm_backlight_data defdata;
456455
struct backlight_properties props;
457456
struct backlight_device *bl;
458-
struct device_node *node = pdev->dev.of_node;
459457
struct pwm_bl_data *pb;
460458
struct pwm_state state;
461459
unsigned int i;
@@ -506,12 +504,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
506504
}
507505

508506
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
509-
if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !node) {
510-
dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
511-
pb->legacy = true;
512-
pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
513-
}
514-
515507
if (IS_ERR(pb->pwm)) {
516508
ret = PTR_ERR(pb->pwm);
517509
if (ret != -EPROBE_DEFER)
@@ -604,8 +596,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
604596
if (IS_ERR(bl)) {
605597
dev_err(&pdev->dev, "failed to register backlight\n");
606598
ret = PTR_ERR(bl);
607-
if (pb->legacy)
608-
pwm_free(pb->pwm);
609599
goto err_alloc;
610600
}
611601

@@ -639,8 +629,6 @@ static int pwm_backlight_remove(struct platform_device *pdev)
639629

640630
if (pb->exit)
641631
pb->exit(&pdev->dev);
642-
if (pb->legacy)
643-
pwm_free(pb->pwm);
644632

645633
return 0;
646634
}

include/linux/pwm_backlight.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <linux/backlight.h>
99

1010
struct platform_pwm_backlight_data {
11-
int pwm_id;
1211
unsigned int max_brightness;
1312
unsigned int dft_brightness;
1413
unsigned int lth_brightness;

0 commit comments

Comments
 (0)