forked from mirrors/linux
		
	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 <u.kleine-koenig@pengutronix.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221117072151.3789691-1-u.kleine-koenig@pengutronix.de
This commit is contained in:
		
							parent
							
								
									901ae537b7
								
							
						
					
					
						commit
						5a7fbe452a
					
				
					 2 changed files with 0 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -28,7 +28,6 @@ struct pwm_bl_data {
 | 
			
		|||
	struct regulator	*power_supply;
 | 
			
		||||
	struct gpio_desc	*enable_gpio;
 | 
			
		||||
	unsigned int		scale;
 | 
			
		||||
	bool			legacy;
 | 
			
		||||
	unsigned int		post_pwm_on_delay;
 | 
			
		||||
	unsigned int		pwm_off_delay;
 | 
			
		||||
	int			(*notify)(struct device *,
 | 
			
		||||
| 
						 | 
				
			
			@ -455,7 +454,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 | 
			
		|||
	struct platform_pwm_backlight_data defdata;
 | 
			
		||||
	struct backlight_properties props;
 | 
			
		||||
	struct backlight_device *bl;
 | 
			
		||||
	struct device_node *node = pdev->dev.of_node;
 | 
			
		||||
	struct pwm_bl_data *pb;
 | 
			
		||||
	struct pwm_state state;
 | 
			
		||||
	unsigned int i;
 | 
			
		||||
| 
						 | 
				
			
			@ -506,12 +504,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
 | 
			
		||||
	if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !node) {
 | 
			
		||||
		dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
 | 
			
		||||
		pb->legacy = true;
 | 
			
		||||
		pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (IS_ERR(pb->pwm)) {
 | 
			
		||||
		ret = PTR_ERR(pb->pwm);
 | 
			
		||||
		if (ret != -EPROBE_DEFER)
 | 
			
		||||
| 
						 | 
				
			
			@ -604,8 +596,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 | 
			
		|||
	if (IS_ERR(bl)) {
 | 
			
		||||
		dev_err(&pdev->dev, "failed to register backlight\n");
 | 
			
		||||
		ret = PTR_ERR(bl);
 | 
			
		||||
		if (pb->legacy)
 | 
			
		||||
			pwm_free(pb->pwm);
 | 
			
		||||
		goto err_alloc;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -639,8 +629,6 @@ static int pwm_backlight_remove(struct platform_device *pdev)
 | 
			
		|||
 | 
			
		||||
	if (pb->exit)
 | 
			
		||||
		pb->exit(&pdev->dev);
 | 
			
		||||
	if (pb->legacy)
 | 
			
		||||
		pwm_free(pb->pwm);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,6 @@
 | 
			
		|||
#include <linux/backlight.h>
 | 
			
		||||
 | 
			
		||||
struct platform_pwm_backlight_data {
 | 
			
		||||
	int pwm_id;
 | 
			
		||||
	unsigned int max_brightness;
 | 
			
		||||
	unsigned int dft_brightness;
 | 
			
		||||
	unsigned int lth_brightness;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue