]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: common: hid-sensor-attributes: make unit_conversion const
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Jun 2025 17:09:26 +0000 (12:09 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Jul 2025 09:37:52 +0000 (10:37 +0100)
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>
drivers/iio/common/hid-sensors/hid-sensor-attributes.c

index 2055a03cbeb187743e687c2ce3f8a339a2bd4cfc..a61428bfdce372ea0511fb7c3e80f4c43f427eb4 100644 (file)
@@ -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 */