lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d50e71dc-72a7-4612-a19d-9d38c9ecbcfa@suse.de>
Date: Wed, 7 Jan 2026 08:32:33 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Chintan Patel <chintanlike@...il.com>, linux-fbdev@...r.kernel.org,
 linux-staging@...ts.linux.dev, linux-omap@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 andy@...nel.org, deller@....de, gregkh@...uxfoundation.org
Subject: Re: [PATCH v4 1/4] fb: Add dev_of_fbinfo() helper for optional sysfs
 support



Am 07.01.26 um 05:42 schrieb Chintan Patel:
> Add dev_of_fbinfo() to return the framebuffer struct device when
> CONFIG_FB_DEVICE is enabled, or NULL otherwise.
>
> This allows fbdev drivers to use sysfs interfaces via runtime checks
> instead of CONFIG_FB_DEVICE ifdefs, keeping the code clean while
> remaining fully buildable.
>
> Suggested-by: Helge Deller <deller@....de>
> Reviewed-by: Helge Deller <deller@....de>
> Reviewed-by: Andy Shevchenko <andy@...nel.org>
> Signed-off-by: Chintan Patel <chintanlike@...il.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>

> ---
>   include/linux/fb.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index 05cc251035da..dad3fb61a06a 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -628,6 +628,15 @@ static inline void unlock_fb_info(struct fb_info *info)
>   	mutex_unlock(&info->lock);
>   }
>   
> +static inline struct device *dev_of_fbinfo(const struct fb_info *info)
> +{
> +#ifdef CONFIG_FB_DEVICE
> +	return info->dev;
> +#else
> +	return NULL;
> +#endif
> +}
> +
>   static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
>   					   u8 *src, u32 s_pitch, u32 height)
>   {

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ