Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bhumika Goyal and committed by
Bjorn Helgaas
1acf8bca 63d182ab

+1 -1
+1 -1
drivers/pci/hotplug/acpiphp_ibm.c
··· 107 107 108 108 static acpi_handle ibm_acpi_handle; 109 109 static struct notification ibm_note; 110 - static struct bin_attribute ibm_apci_table_attr = { 110 + static struct bin_attribute ibm_apci_table_attr __ro_after_init = { 111 111 .attr = { 112 112 .name = "apci_table", 113 113 .mode = S_IRUGO,