]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI/sysfs: Remove pci_create_legacy_files() and pci_sysfs_init()
authorKrzysztof Wilczyński <kwilczynski@kernel.org>
Fri, 8 May 2026 04:35:42 +0000 (04:35 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Jun 2026 20:19:09 +0000 (15:19 -0500)
commit2800a911ced1540baa78de7494218aaf1c7dc4fa
tree6c98cd8d1d642b58eabf4661a8801d3053f7d22d
parent4e14b965a625f2c2813bec0a6a7530426ae508fb
PCI/sysfs: Remove pci_create_legacy_files() and pci_sysfs_init()

Currently, pci_create_legacy_files() and pci_remove_legacy_files() are
no-op stubs.  With legacy attributes now handled by static groups
registered via pcibus_groups[], no call site needs them.

Remove both functions, their declarations, and the call sites in
pci_register_host_bridge(), pci_alloc_child_bus(), and pci_remove_bus().

Remove the pci_sysfs_init() late_initcall and sysfs_initialized.  The
late_initcall originally existed to create all the dynamic PCI sysfs files,
but with both resource and legacy attributes now handled by static groups,
it is no longer needed.

Remove the legacy_io and legacy_mem fields from struct pci_bus which were
used to track the dynamically allocated legacy attributes.

Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Link: https://patch.msgid.link/20260508043543.217179-24-kwilczynski@kernel.org
drivers/pci/pci-sysfs.c
drivers/pci/pci.h
drivers/pci/probe.c
drivers/pci/remove.c
include/linux/pci.h