From: Mario Limonciello <mario.limonciello@xxxxxxx> When compiled without CONFIG_VIDEO pci_create_boot_display_file() will never create a sysfs file for boot_display. Guard the sysfs file declaration against CONFIG_VIDEO. Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Closes: https://lore.kernel.org/linux-next/20250718224118.5b3f22b0@xxxxxxxxxxxxxxxx/ Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx> --- drivers/pci/pci-sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 6b1a0ae254d3a..f6540a72204d3 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -680,12 +680,14 @@ const struct attribute_group *pcibus_groups[] = { NULL, }; +#ifdef CONFIG_VIDEO static ssize_t boot_display_show(struct device *dev, struct device_attribute *attr, char *buf) { return sysfs_emit(buf, "1\n"); } static DEVICE_ATTR_RO(boot_display); +#endif /* CONFIG_VIDEO */ static ssize_t boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf) -- 2.43.0