diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-03-05 17:22:39 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-28 11:09:02 +0100 |
commit | 397b7493729288ac308c5f4ff3496eaeb1080293 (patch) | |
tree | 8cbf811f0a8a141fa35dd3b5b3fea93242b6408e /drivers/video/backlight | |
parent | backlight: aat2870-backlight: Remove struct backlight.check_fb (diff) | |
download | linux-397b7493729288ac308c5f4ff3496eaeb1080293.tar.xz linux-397b7493729288ac308c5f4ff3496eaeb1080293.zip |
backlight: pwm-backlight: Remove struct backlight_ops.check_fb
The internal check_fb callback from struct pwm_bl_data is never
implemented. The driver's implementation of check_fb always
returns true, which is the backlight core's default if no
implementation has been set. So remove the code from the driver.
v2:
* reword commit message
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20240305162425.23845-7-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index ffcebf6aa76a..61d30bc98eea 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -11,7 +11,6 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> -#include <linux/fb.h> #include <linux/backlight.h> #include <linux/err.h> #include <linux/pwm.h> @@ -34,7 +33,6 @@ struct pwm_bl_data { int brightness); void (*notify_after)(struct device *, int brightness); - int (*check_fb)(struct device *, struct fb_info *); void (*exit)(struct device *); }; @@ -129,17 +127,8 @@ static int pwm_backlight_update_status(struct backlight_device *bl) return 0; } -static int pwm_backlight_check_fb(struct backlight_device *bl, - struct fb_info *info) -{ - struct pwm_bl_data *pb = bl_get_data(bl); - - return !pb->check_fb || pb->check_fb(pb->dev, info); -} - static const struct backlight_ops pwm_backlight_ops = { .update_status = pwm_backlight_update_status, - .check_fb = pwm_backlight_check_fb, }; #ifdef CONFIG_OF @@ -482,7 +471,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->notify = data->notify; pb->notify_after = data->notify_after; - pb->check_fb = data->check_fb; pb->exit = data->exit; pb->dev = &pdev->dev; pb->enabled = false; |