Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750864AbdHaHqk (ORCPT ); Thu, 31 Aug 2017 03:46:40 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38193 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbdHaHqj (ORCPT ); Thu, 31 Aug 2017 03:46:39 -0400 From: Arvind Yadav To: andy@infradead.org, dvhart@infradead.org, ibm-acpi@hmh.eng.br Cc: linux-kernel@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net Subject: [PATCH] platform: thinkpad_acpi: constify driver_attribute Date: Thu, 31 Aug 2017 13:16:10 +0530 Message-Id: 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 Content-Length: 958 Lines: 24 driver_attribute are not supposed to change at runtime. Functions driver_create_file/driver_remove_file are working with const driver_attribute. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index b225731..45b50ef 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1561,7 +1561,7 @@ static ssize_t uwb_emulstate_store(struct device_driver *drv, const char *buf, /* --------------------------------------------------------------------- */ -static struct driver_attribute *tpacpi_driver_attributes[] = { +static const struct driver_attribute *tpacpi_driver_attributes[] = { &driver_attr_debug_level, &driver_attr_version, &driver_attr_interface_version, }; -- 1.9.1