mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
sysfs: Rename struct bin_attribute member to f_mapping
There are two users of iomem_get_mapping(), the struct file and struct bin_attribute. The former has a member called "f_mapping" and the latter has a member called "mapping", and both are poniters to struct address_space. Rename struct bin_attribute member to "f_mapping" to keep both meaning and the usage consistent with other users of iomem_get_mapping(). Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Link: https://lore.kernel.org/r/20210729233235.1508920-3-kw@linux.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
93bb8e352a
commit
f06aff924f
|
@ -965,7 +965,7 @@ void pci_create_legacy_files(struct pci_bus *b)
|
||||||
b->legacy_io->read = pci_read_legacy_io;
|
b->legacy_io->read = pci_read_legacy_io;
|
||||||
b->legacy_io->write = pci_write_legacy_io;
|
b->legacy_io->write = pci_write_legacy_io;
|
||||||
b->legacy_io->mmap = pci_mmap_legacy_io;
|
b->legacy_io->mmap = pci_mmap_legacy_io;
|
||||||
b->legacy_io->mapping = iomem_get_mapping;
|
b->legacy_io->f_mapping = iomem_get_mapping;
|
||||||
pci_adjust_legacy_attr(b, pci_mmap_io);
|
pci_adjust_legacy_attr(b, pci_mmap_io);
|
||||||
error = device_create_bin_file(&b->dev, b->legacy_io);
|
error = device_create_bin_file(&b->dev, b->legacy_io);
|
||||||
if (error)
|
if (error)
|
||||||
|
@ -978,7 +978,7 @@ void pci_create_legacy_files(struct pci_bus *b)
|
||||||
b->legacy_mem->size = 1024*1024;
|
b->legacy_mem->size = 1024*1024;
|
||||||
b->legacy_mem->attr.mode = 0600;
|
b->legacy_mem->attr.mode = 0600;
|
||||||
b->legacy_mem->mmap = pci_mmap_legacy_mem;
|
b->legacy_mem->mmap = pci_mmap_legacy_mem;
|
||||||
b->legacy_io->mapping = iomem_get_mapping;
|
b->legacy_io->f_mapping = iomem_get_mapping;
|
||||||
pci_adjust_legacy_attr(b, pci_mmap_mem);
|
pci_adjust_legacy_attr(b, pci_mmap_mem);
|
||||||
error = device_create_bin_file(&b->dev, b->legacy_mem);
|
error = device_create_bin_file(&b->dev, b->legacy_mem);
|
||||||
if (error)
|
if (error)
|
||||||
|
@ -1195,7 +1195,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (res_attr->mmap)
|
if (res_attr->mmap)
|
||||||
res_attr->mapping = iomem_get_mapping;
|
res_attr->f_mapping = iomem_get_mapping;
|
||||||
res_attr->attr.name = res_attr_name;
|
res_attr->attr.name = res_attr_name;
|
||||||
res_attr->attr.mode = 0600;
|
res_attr->attr.mode = 0600;
|
||||||
res_attr->size = pci_resource_len(pdev, num);
|
res_attr->size = pci_resource_len(pdev, num);
|
||||||
|
|
|
@ -174,8 +174,8 @@ static int sysfs_kf_bin_open(struct kernfs_open_file *of)
|
||||||
{
|
{
|
||||||
struct bin_attribute *battr = of->kn->priv;
|
struct bin_attribute *battr = of->kn->priv;
|
||||||
|
|
||||||
if (battr->mapping)
|
if (battr->f_mapping)
|
||||||
of->file->f_mapping = battr->mapping();
|
of->file->f_mapping = battr->f_mapping();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@ struct bin_attribute {
|
||||||
struct attribute attr;
|
struct attribute attr;
|
||||||
size_t size;
|
size_t size;
|
||||||
void *private;
|
void *private;
|
||||||
struct address_space *(*mapping)(void);
|
struct address_space *(*f_mapping)(void);
|
||||||
ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *,
|
ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *,
|
||||||
char *, loff_t, size_t);
|
char *, loff_t, size_t);
|
||||||
ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *,
|
ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *,
|
||||||
|
|
Loading…
Reference in a new issue