Hi
Am 15.02.24 um 13:06 schrieb Daniel Thompson:
On Mon, Feb 12, 2024 at 05:16:37PM +0100, Thomas Zimmermann wrote:
The driver sets struct fb_info.bl_dev to the correct backlight
device.
This looks like it was copied from a different patch since you
added code to do this as part of the patch!
Yeah, I did. I'll reword this sentence to make I more precise.
Best regards
Thomas
Thus rely on the backlight core code to match backlight
and framebuffer devices, and remove the extra check_fb function
from struct backlight_ops.
<snip>
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index d7dddd99d325e..4500f6e03d32f 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -493,6 +493,10 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
info->fix = picolcdfb_fix;
info->fix.smem_len = PICOLCDFB_SIZE*8;
+#ifdef CONFIG_HID_PICOLCD_BACKLIGHT
+ info->bl_dev = data->backlight;
+#endif
+
fbdata = info->par;
spin_lock_init(&fbdata->lock);
fbdata->picolcd = data;
Daniel.
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)