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

Daniel Thompson
2024-02-15T12:06:33Z

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!

> 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.