Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1723942
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] platform: thinkpad_acpi: constify driver_attribute |
| Date | 2017-08-31 09:50 +0200 |
| Message-ID | <uksoG-2N0-23@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] platform: thinkpad_acpi: constify driver_attribute Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-31 09:50 +0200
csiph-web