diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-09-06 09:52:40 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-09-30 17:49:42 +0200 |
commit | 43e1120deb3768c86aa3875c7073658e44a30ea5 (patch) | |
tree | 373c25da27885f678e3a76a1b65a2d52fd039a38 /drivers/video/backlight/platform_lcd.c | |
parent | HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev (diff) | |
download | linux-43e1120deb3768c86aa3875c7073658e44a30ea5.tar.xz linux-43e1120deb3768c86aa3875c7073658e44a30ea5.zip |
backlight: lcd: Replace check_fb with controls_device
Rename check_fb in struct lcd_ops to controls_device. The callback
is now independent from fbdev's struct fb_info and tests if an lcd
device controls a hardware display device. The new naming and semantics
follow similar functionality for backlight devices.
v2:
- fix typos in commit description (Daniel)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240906075439.98476-27-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/video/backlight/platform_lcd.c')
-rw-r--r-- | drivers/video/backlight/platform_lcd.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 69a22d1a8a35..c9fe50f4d8ed 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -9,7 +9,6 @@ #include <linux/module.h> #include <linux/platform_device.h> -#include <linux/fb.h> #include <linux/lcd.h> #include <linux/slab.h> @@ -50,17 +49,17 @@ static int platform_lcd_set_power(struct lcd_device *lcd, int power) return 0; } -static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info) +static bool platform_lcd_controls_device(struct lcd_device *lcd, struct device *display_device) { struct platform_lcd *plcd = to_our_lcd(lcd); - return plcd->us->parent == info->device; + return plcd->us->parent == display_device; } static const struct lcd_ops platform_lcd_ops = { - .get_power = platform_lcd_get_power, - .set_power = platform_lcd_set_power, - .check_fb = platform_lcd_match, + .get_power = platform_lcd_get_power, + .set_power = platform_lcd_set_power, + .controls_device = platform_lcd_controls_device, }; static int platform_lcd_probe(struct platform_device *pdev) |