All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Fix warning without CONFIG_VIDEO
@ 2025-07-18 13:41 Mario Limonciello
  2025-07-18 17:00 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Limonciello @ 2025-07-18 13:41 UTC (permalink / raw)
  To: mario.limonciello, bhelgaas; +Cc: Stephen Rothwell, linux-pci

From: Mario Limonciello <mario.limonciello@amd.com>

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@canb.auug.org.au>
Closes: https://lore.kernel.org/linux-next/20250718224118.5b3f22b0@canb.auug.org.au/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-07-21 15:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 13:41 [PATCH] PCI: Fix warning without CONFIG_VIDEO Mario Limonciello
2025-07-18 17:00 ` Manivannan Sadhasivam
2025-07-18 17:06   ` Mario Limonciello
2025-07-18 17:23     ` Manivannan Sadhasivam
2025-07-18 17:26       ` Mario Limonciello
2025-07-19  2:47         ` Manivannan Sadhasivam
2025-07-19 13:46           ` Mario Limonciello
2025-07-21  8:00             ` Manivannan Sadhasivam
2025-07-21 15:53               ` Mario Limonciello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.