summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-02 17:27:27 +0200
committerBjorn Helgaas <bhelgaas@google.com>2017-08-10 22:21:42 +0200
commit8bdc50ac56ab97e7585ee928a1017284afeee17a (patch)
tree71f0d08f72670853f81f2588537752abaf2a2d41 /drivers/pci
parentPCI: Constify hotplug pci_device_id structures (diff)
downloadlinux-8bdc50ac56ab97e7585ee928a1017284afeee17a.tar.xz
linux-8bdc50ac56ab97e7585ee928a1017284afeee17a.zip
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 2eed0dce258b..93e7b97765d7 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1431,7 +1431,7 @@ static ssize_t pci_read_rom(struct file *filp, struct kobject *kobj,
return count;
}
-static struct bin_attribute pci_config_attr = {
+static const struct bin_attribute pci_config_attr = {
.attr = {
.name = "config",
.mode = S_IRUGO | S_IWUSR,
@@ -1441,7 +1441,7 @@ static struct bin_attribute pci_config_attr = {
.write = pci_write_config,
};
-static struct bin_attribute pcie_config_attr = {
+static const struct bin_attribute pcie_config_attr = {
.attr = {
.name = "config",
.mode = S_IRUGO | S_IWUSR,