aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pci-keystone.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <[email protected]>2021-04-16 20:58:40 +0000
committerBjorn Helgaas <[email protected]>2021-04-29 15:07:31 +0000
commitd93f8399053dcf117ff56a3029ff08c0e36f4b75 (patch)
treeebd1e7ae946864b9a68804c50c3223aaa715262a /drivers/pci/controller/dwc/pci-keystone.c
parentPCI/sysfs: Rename "vpd" attribute accessors (diff)
downloadkernel-d93f8399053dcf117ff56a3029ff08c0e36f4b75.tar.gz
kernel-d93f8399053dcf117ff56a3029ff08c0e36f4b75.zip
PCI/sysfs: Convert "vpd" to static attribute
The "vpd" sysfs attribute allows access to Vital Product Data (VPD). 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 "vpd" to a static attribute and use the .is_bin_visible() callback to check whether the device supports VPD. Remove pcie_vpd_create_sysfs_dev_files(), pcie_vpd_remove_sysfs_dev_files(), pci_create_capabilities_sysfs(), and pci_create_capabilities_sysfs(), which are no longer needed. [bhelgaas: This is substantially the same as the earlier patch from Heiner Kallweit <[email protected]>. I included Krzysztof's change here so all the "convert to static attribute" changes are together.] [bhelgaas: rename to vpd_read()/vpd_write() and pci_dev_vpd_attr_group] Suggested-by: Oliver O'Halloran <[email protected]> Based-on: https://lore.kernel.org/r/[email protected] Based-on-patch-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Wilczyński <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-keystone.c')
0 files changed, 0 insertions, 0 deletions