Thread (16 messages) 16 messages, 4 authors, 2024-02-23

Re: [PATCH v2 01/10] backlight: Match backlight device against struct fb_info.bl_dev

flat view

From: Andy Shevchenko <andy@kernel.org>
Date: 2024-02-21 14:34:15
Also in: dri-devel, linux-input, linux-pwm

On Wed, Feb 21, 2024 at 10:41:28AM +0100, Thomas Zimmermann wrote:
Framebuffer drivers for devices with dedicated backlight are supposed
to set struct fb_info.bl_dev to the backlight's respective device. Use
the value to match backlight and framebuffer in the backlight core code.
...
quoted hunk ↗ jump to hunk
 	if (!bd->ops)
 		goto out;
-	if (bd->ops->check_fb && !bd->ops->check_fb(bd, evdata->info))
+	else if (bd->ops->check_fb && !bd->ops->check_fb(bd, info))
What's the point of adding redundant 'else'?
quoted hunk ↗ jump to hunk
 		goto out;
+#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
+	else if (info->bl_dev && info->bl_dev != bd)
Ditto.
+		goto out;
+#endif
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help