diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-03-05 19:22:43 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-28 13:09:06 +0300 |
commit | 0a4be7263749945a3882f7a0e2e5b1c45c31064e (patch) | |
tree | 76787247220793a2de23ab1c7d15fed981533f35 /drivers/video/backlight/lv5207lp.c | |
parent | 7929446702295f7e336c13b39302589070f11560 (diff) | |
download | linux-0a4be7263749945a3882f7a0e2e5b1c45c31064e.tar.xz |
backlight: Add controls_device callback to struct backlight_ops
Replace check_fb with controls_device in struct backlight_ops. The
new callback interface takes a Linux device instead of a framebuffer.
Resolves one of the dependencies of backlight.h on fb.h.
The few drivers that had custom implementations of check_fb can easily
use the framebuffer's Linux device instead. Update them accordingly.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.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-11-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/video/backlight/lv5207lp.c')
-rw-r--r-- | drivers/video/backlight/lv5207lp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/backlight/lv5207lp.c b/drivers/video/backlight/lv5207lp.c index 1f1d06b4e119..0cf00fee0f60 100644 --- a/drivers/video/backlight/lv5207lp.c +++ b/drivers/video/backlight/lv5207lp.c @@ -62,18 +62,18 @@ static int lv5207lp_backlight_update_status(struct backlight_device *backlight) return 0; } -static int lv5207lp_backlight_check_fb(struct backlight_device *backlight, - struct fb_info *info) +static bool lv5207lp_backlight_controls_device(struct backlight_device *backlight, + struct device *display_dev) { struct lv5207lp *lv = bl_get_data(backlight); - return !lv->pdata->dev || lv->pdata->dev == info->device; + return !lv->pdata->dev || lv->pdata->dev == display_dev; } static const struct backlight_ops lv5207lp_backlight_ops = { - .options = BL_CORE_SUSPENDRESUME, - .update_status = lv5207lp_backlight_update_status, - .check_fb = lv5207lp_backlight_check_fb, + .options = BL_CORE_SUSPENDRESUME, + .update_status = lv5207lp_backlight_update_status, + .controls_device = lv5207lp_backlight_controls_device, }; static int lv5207lp_probe(struct i2c_client *client) |