]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 26 Dec 2016 15:36:35 +0000 (21:06 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 11 Jan 2017 20:56:02 +0000 (14:56 -0600)
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>
drivers/pci/hotplug/acpiphp_ibm.c

index 68d105aaf4e2ef9daf6ee37800cff620805b3487..984c7e8cec5aeeb3ab007cf1a69a1ca44de15856 100644 (file)
@@ -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,