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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 21, 2024 at 5:45 PM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
> Am 21.02.24 um 15:34 schrieb Andy Shevchenko:
> > 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.

...

> >>      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'?
> >
> >>              goto out;
> >> +#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
> >> +    else if (info->bl_dev && info->bl_dev != bd)
> > Ditto.
>
> They group these tests into one single block of code; signaling that
> these tests serve the same purpose.

Commit message has nothing about this.
Also if needed, it should be a separate change.

> >> +            goto out;
> >> +#endif

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux