backlight: Add controls_device callback to struct backlight_ops
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 5 Mar 2024 16:22:43 +0000 (17:22 +0100)
committerLee Jones <lee@kernel.org>
Thu, 28 Mar 2024 10:09:06 +0000 (10:09 +0000)
commit0a4be7263749945a3882f7a0e2e5b1c45c31064e
tree76787247220793a2de23ab1c7d15fed981533f35
parent7929446702295f7e336c13b39302589070f11560
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>
drivers/video/backlight/backlight.c
drivers/video/backlight/bd6107.c
drivers/video/backlight/gpio_backlight.c
drivers/video/backlight/lv5207lp.c
include/linux/backlight.h