Thread (37 messages) 37 messages, 7 authors, 2024-02-21

Re: [PATCH 04/10] hid/hid-picolcd: Remove struct backlight_ops.check_fb

From: Daniel Thompson <hidden>
Date: 2024-02-15 12:06:33
Also in: dri-devel, linux-input, linux-pwm

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!
quoted hunk ↗ jump to hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help