diff options
| author | Chintan Patel <chintanlike@gmail.com> | 2026-01-06 20:42:57 -0800 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-02-14 11:09:46 +0100 |
| commit | c2925992232fdc4e90f030b77e7867921db071b5 (patch) | |
| tree | 9caf80fea07032d1d96f5cff308a9e4bb9348176 /drivers/video/fbdev | |
| parent | bf9ec461a7d1b82bbc3fe110fba9e9533879849d (diff) | |
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>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/sh_mobile_lcdcfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index dd950e4ab5ce..5f3a0cd27db3 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -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", |
