mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PCI: Constify bin_attribute structures
Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file. The corresponding arguments are of type const, so declare the structures to be const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
8394264da2
commit
8bdc50ac56
1 changed files with 2 additions and 2 deletions
|
@ -1431,7 +1431,7 @@ static ssize_t pci_read_rom(struct file *filp, struct kobject *kobj,
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct bin_attribute pci_config_attr = {
|
static const struct bin_attribute pci_config_attr = {
|
||||||
.attr = {
|
.attr = {
|
||||||
.name = "config",
|
.name = "config",
|
||||||
.mode = S_IRUGO | S_IWUSR,
|
.mode = S_IRUGO | S_IWUSR,
|
||||||
|
@ -1441,7 +1441,7 @@ static struct bin_attribute pci_config_attr = {
|
||||||
.write = pci_write_config,
|
.write = pci_write_config,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct bin_attribute pcie_config_attr = {
|
static const struct bin_attribute pcie_config_attr = {
|
||||||
.attr = {
|
.attr = {
|
||||||
.name = "config",
|
.name = "config",
|
||||||
.mode = S_IRUGO | S_IWUSR,
|
.mode = S_IRUGO | S_IWUSR,
|
||||||
|
|
Loading…
Add table
Reference in a new issue