summaryrefslogtreecommitdiff
path: root/drivers/pci/remove.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2021-04-16 23:58:38 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-04-28 01:53:17 +0300
commit527139d738d7f2e9f929c752eebf3cbf0f74c754 (patch)
treeaf505f656c57f653f7b98979a16ab13cca8f01eb /drivers/pci/remove.c
parente1d3f3268b0e512ceb811dd4765e476626bde71c (diff)
downloadlinux-527139d738d7f2e9f929c752eebf3cbf0f74c754.tar.xz
PCI/sysfs: Convert "rom" to static attribute
The "rom" sysfs attribute allows access to the PCI Option ROM. Previously it was dynamically created either by pci_bus_add_device() or the pci_sysfs_init() initcall, but since it doesn't need to be created or removed dynamically, we can use a static attribute so the device model takes care of addition and removal automatically. Convert "rom" to a static attribute and use the .is_bin_visible() callback to set the correct object size based on the ROM size. Remove "rom_attr" from the struct pci_dev since it is no longer needed. This attribute was added in the pre-git era by https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/drivers/pci/pci-sysfs.c?id=f6d553444da2 [bhelgaas: commit log] Suggested-by: Oliver O'Halloran <oohall@gmail.com> Link: https://lore.kernel.org/r/20210416205856.3234481-3-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/remove.c')
0 files changed, 0 insertions, 0 deletions