]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
authorChintan Patel <chintanlike@gmail.com>
Wed, 7 Jan 2026 04:42:57 +0000 (20:42 -0800)
committerHelge Deller <deller@gmx.de>
Sat, 14 Feb 2026 10:09:46 +0000 (11:09 +0100)
The sh_mobile_lcdc driver exposes overlay configuration via sysfs, but the
core driver does not require CONFIG_FB_DEVICE.

Make overlay sysfs optional so that the driver can build and operate
even when FB_DEVICE is disabled. The kernel naturally ignores the
missing attribute group, preserving buildability and type safety.

Suggested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Chintan Patel <chintanlike@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/sh_mobile_lcdcfb.c

index dd950e4ab5cebd6b44bd59f2b00af97c1aa8459d..5f3a0cd27db374fcddaf03db4d479a2006d8c512 100644 (file)
@@ -1343,14 +1343,17 @@ static DEVICE_ATTR_RW(overlay_mode);
 static DEVICE_ATTR_RW(overlay_position);
 static DEVICE_ATTR_RW(overlay_rop3);
 
-static struct attribute *overlay_sysfs_attrs[] = {
+static struct attribute *overlay_sysfs_attrs[] __maybe_unused = {
        &dev_attr_overlay_alpha.attr,
        &dev_attr_overlay_mode.attr,
        &dev_attr_overlay_position.attr,
        &dev_attr_overlay_rop3.attr,
        NULL,
 };
+
+#ifdef CONFIG_FB_DEVICE
 ATTRIBUTE_GROUPS(overlay_sysfs);
+#endif
 
 static const struct fb_fix_screeninfo sh_mobile_lcdc_overlay_fix  = {
        .id =           "SH Mobile LCDC",