summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_ibm.c
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-12-26 16:36:35 +0100
committerBjorn Helgaas <bhelgaas@google.com>2017-01-11 21:56:02 +0100
commit1acf8bca9cdb2443a8707ff0afc3aadbfb5669f4 (patch)
treef161274bccf1fe4fc238362a27f89bdb4ec756a7 /drivers/pci/hotplug/acpiphp_ibm.c
parentPCI: rpadlpar: Remove unnecessary return statement (diff)
downloadlinux-1acf8bca9cdb2443a8707ff0afc3aadbfb5669f4.tar.xz
linux-1acf8bca9cdb2443a8707ff0afc3aadbfb5669f4.zip
PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init
ibm_apci_table_attr is not modified after being initialized by ibm_acpiphp_init(). It is passed as an argument to the functions sysfs_{remove/create}_bin_file(), but both the arguments are const. Add __ro_after_init to its declaration. [bhelgaas: changelog] Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_ibm.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 68d105aaf4e2..984c7e8cec5a 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -107,7 +107,7 @@ static void __exit ibm_acpiphp_exit(void);
static acpi_handle ibm_acpi_handle;
static struct notification ibm_note;
-static struct bin_attribute ibm_apci_table_attr = {
+static struct bin_attribute ibm_apci_table_attr __ro_after_init = {
.attr = {
.name = "apci_table",
.mode = S_IRUGO,