From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754503AbcLZPgv (ORCPT ); Mon, 26 Dec 2016 10:36:51 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33958 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbcLZPgs (ORCPT ); Mon, 26 Dec 2016 10:36:48 -0500 From: Bhumika Goyal To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org, bhelgaas@google.com, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: keescook@chromium.org, Bhumika Goyal Subject: [PATCH] PCI: acpiphp_ibm: add __ro_after_init to ibm_apci_table_attr Date: Mon, 26 Dec 2016 21:06:35 +0530 Message-Id: <1482766595-12679-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The object ibm_apci_table_attr of type bin_attribute structure is not modified after getting initialized by ibm_acpiphp_init. Apart from getting referenced in init it is also passed as an argument to the functions sysfs_{remove/create}_bin_file but both the arguments are of type const struct bin_attribute *. Therefore add __ro_after_init to its declaration. Signed-off-by: Bhumika Goyal --- drivers/pci/hotplug/acpiphp_ibm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index f6221d7..188cdfa 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c @@ -107,7 +107,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, 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, -- 1.9.1