@@ -1122,16 +1122,16 @@ static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
return -EINVAL;
}
-static ssize_t pci_read_resource_io(struct file *filp, struct kobject *kobj,
- struct bin_attribute *attr, char *buf,
- loff_t off, size_t count)
+static ssize_t pci_read_resource(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *attr, char *buf,
+ loff_t off, size_t count)
{
return pci_resource_io(filp, kobj, attr, buf, off, count, false);
}
-static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
- struct bin_attribute *attr, char *buf,
- loff_t off, size_t count)
+static ssize_t pci_write_resource(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *attr, char *buf,
+ loff_t off, size_t count)
{
int ret;
@@ -1168,8 +1168,8 @@ static umode_t pci_dev_resource_attr_is_visible(struct kobject *kobj,
#define pci_dev_bin_attribute(_name, _mmap, _bar) \
struct bin_attribute pci_dev_##_name##_attr = { \
.attr = { .name = __stringify(_name), .mode = 0600 }, \
- .read = pci_read_resource_io, \
- .write = pci_write_resource_io, \
+ .read = pci_read_resource, \
+ .write = pci_write_resource, \
.mmap = _mmap, \
.private = (void *)(unsigned long)_bar, \
.f_mapping = iomem_get_mapping, \
The pci_read_resource_io() and pci_write_resource_io() functions are used for the corresponding read() and write() callbacks when declaring and defining a static sysfs object for a given PCI resource. Currently, only reading and writing against an I/O BARs is supported, but we might change this in the future to also include memory-mapped resources. Thus, rename to read() and write() callbacks to be more generic and drop the I/O BARs-specific suffix from them. Signed-off-by: Krzysztof Wilczyński <kw@linux.com> --- drivers/pci/pci-sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)