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.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -726,8 +726,6 @@ struct pci_bus { · 725 unmodified lines | |||
| 726 | pci_bus_flags_t bus_flags; /* Inherited by child buses */ | 726 | pci_bus_flags_t bus_flags; /* Inherited by child buses */ |
| 727 | struct device *bridge; | 727 | struct device *bridge; |
| 728 | struct device dev; | 728 | struct device dev; |
| 729 | struct bin_attribute *legacy_io; /* Legacy I/O for this bus */ | ||
| 730 | struct bin_attribute *legacy_mem; /* Legacy mem */ | ||
| 731 | unsigned int is_added:1; | 729 | unsigned int is_added:1; |
| 732 | unsigned int unsafe_warn:1; /* warned about RW1C config write */ | 730 | unsigned int unsafe_warn:1; /* warned about RW1C config write */ |
| 733 | unsigned int flit_mode:1; /* Link in Flit mode */ | 731 | unsigned int flit_mode:1; /* Link in Flit mode */ |