* [PATCH] platform: thinkpad_acpi: constify driver_attribute
@ 2017-08-31 7:46 Arvind Yadav
0 siblings, 0 replies; only message in thread
From: Arvind Yadav @ 2017-08-31 7:46 UTC (permalink / raw)
To: andy, dvhart, ibm-acpi; +Cc: linux-kernel, ibm-acpi-devel
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 <arvind.yadav.cs@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-31 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 7:46 [PATCH] platform: thinkpad_acpi: constify driver_attribute Arvind Yadav
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.