Skip to content

Commit c292599

Browse files
nehudesihdeller
authored andcommitted
fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
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>
1 parent bf9ec46 commit c292599

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/video/fbdev/sh_mobile_lcdcfb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,14 +1343,17 @@ static DEVICE_ATTR_RW(overlay_mode);
13431343
static DEVICE_ATTR_RW(overlay_position);
13441344
static DEVICE_ATTR_RW(overlay_rop3);
13451345

1346-
static struct attribute *overlay_sysfs_attrs[] = {
1346+
static struct attribute *overlay_sysfs_attrs[] __maybe_unused = {
13471347
&dev_attr_overlay_alpha.attr,
13481348
&dev_attr_overlay_mode.attr,
13491349
&dev_attr_overlay_position.attr,
13501350
&dev_attr_overlay_rop3.attr,
13511351
NULL,
13521352
};
1353+
1354+
#ifdef CONFIG_FB_DEVICE
13531355
ATTRIBUTE_GROUPS(overlay_sysfs);
1356+
#endif
13541357

13551358
static const struct fb_fix_screeninfo sh_mobile_lcdc_overlay_fix = {
13561359
.id = "SH Mobile LCDC",

0 commit comments

Comments
 (0)