Re: [PATCH v4 1/4] fb: Add dev_of_fbinfo() helper for optional sysfs support

From: Chintan Patel

Date: Sun Jan 11 2026 - 14:51:07 EST




On 1/11/26 10:50, Helge Deller wrote:
On 1/7/26 05:42, Chintan Patel wrote:
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@xxxxxx>
Reviewed-by: Helge Deller <deller@xxxxxx>
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
Signed-off-by: Chintan Patel <chintanlike@xxxxxxxxx>
---
  include/linux/fb.h | 9 +++++++++
  1 file changed, 9 insertions(+)

Whole v4 series applied to fbdev git tree.

Appreciate Helge and everyone who reviewed it! This was my first kernel series and it was good learning experience for me.