summaryrefslogtreecommitdiff
path: root/drivers/pci/vpd.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-04-28 21:32:53 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-04-29 18:07:17 +0300
commit07b4523e9e2fe9763e5c62da032d3c444e83d0fd (patch)
tree9d8d1b031d00084897b61866eddf6766623e1b8a /drivers/pci/vpd.c
parentf42c35ea3b137c01b3e073232131674be8efb924 (diff)
downloadlinux-07b4523e9e2fe9763e5c62da032d3c444e83d0fd.tar.xz
PCI/sysfs: Rename "vpd" attribute accessors
Rename "vpd" attribute accessors so they fit with the BIN_ATTR_RW() macro usage. Currently there is no BIN_ATTR_ADMIN_RW() that uses 0600 permissions, but if there were, it would likely use "vpd_read()" and "vpd_write()". No functional change intended. Extracted from the patch mentioned below by Heiner Kallweit <hkallweit1@gmail.com>. Link: https://lore.kernel.org/linux-pci/7703024f-8882-9eec-a122-599871728a89@gmail.com/ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/vpd.c')
-rw-r--r--drivers/pci/vpd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
index 7915d10f9aa1..874bc155ffb5 100644
--- a/drivers/pci/vpd.c
+++ b/drivers/pci/vpd.c
@@ -397,9 +397,9 @@ void pci_vpd_release(struct pci_dev *dev)
kfree(dev->vpd);
}
-static ssize_t read_vpd_attr(struct file *filp, struct kobject *kobj,
- struct bin_attribute *bin_attr, char *buf,
- loff_t off, size_t count)
+static ssize_t vpd_read(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *bin_attr, char *buf, loff_t off,
+ size_t count)
{
struct pci_dev *dev = to_pci_dev(kobj_to_dev(kobj));
@@ -413,9 +413,9 @@ static ssize_t read_vpd_attr(struct file *filp, struct kobject *kobj,
return pci_read_vpd(dev, off, count, buf);
}
-static ssize_t write_vpd_attr(struct file *filp, struct kobject *kobj,
- struct bin_attribute *bin_attr, char *buf,
- loff_t off, size_t count)
+static ssize_t vpd_write(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *bin_attr, char *buf, loff_t off,
+ size_t count)
{
struct pci_dev *dev = to_pci_dev(kobj_to_dev(kobj));
@@ -445,8 +445,8 @@ void pcie_vpd_create_sysfs_dev_files(struct pci_dev *dev)
attr->size = 0;
attr->attr.name = "vpd";
attr->attr.mode = S_IRUSR | S_IWUSR;
- attr->read = read_vpd_attr;
- attr->write = write_vpd_attr;
+ attr->read = vpd_read;
+ attr->write = vpd_write;
retval = sysfs_create_bin_file(&dev->dev.kobj, attr);
if (retval) {
kfree(attr);