summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2025-06-28 12:09:26 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-07-06 10:37:52 +0100
commitf391719dd1b8438bd7b8525575bd6130d4ba1395 (patch)
tree5dcc621f2b151ca7deb0bb8567e1276a22e38ecb
parent1e9e9669ff3dbc8029c71e189e8ca5d6cede9edf (diff)
iio: common: hid-sensor-attributes: make unit_conversion const
Add const qualifier to struct unit_conversion[]. This is read-only data so it can be made const. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250628-iio-const-data-14-v1-1-4faa8015e122@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-attributes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 2055a03cbeb1..a61428bfdce3 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -11,7 +11,7 @@
#include <linux/hid-sensor-hub.h>
#include <linux/iio/iio.h>
-static struct {
+static const struct {
u32 usage_id;
int unit; /* 0 for default others from HID sensor spec */
int scale_val0; /* scale, whole number */